Skip to content

Instantly share code, notes, and snippets.

@miquelruiz
Created December 27, 2013 14:29
Show Gist options
  • Save miquelruiz/8147660 to your computer and use it in GitHub Desktop.
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
#!/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