Created
December 27, 2013 14:29
-
-
Save miquelruiz/8147660 to your computer and use it in GitHub Desktop.
Can't call method "index" on an undefined value at elastic-model-test.pl line 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
my $model = MySubclass->new; | |
$model->namespace('myapp')->index->create(); | |
package MyApp; | |
use Elastic::Model; | |
has_namespace 'myapp' => { | |
user => 'MyApp::User', | |
}; | |
no Elastic::Model; | |
package MyApp::User; | |
use Elastic::Doc; | |
has name => ( is => 'rw', isa => 'Str' ); | |
no Elastic::Doc; | |
package MySubclass; | |
use Elastic::Model; | |
extends 'MyApp'; | |
no Elastic::Model; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment