Created
October 3, 2012 16:31
-
-
Save andrefs/3828094 to your computer and use it in GitHub Desktop.
Elastic::Model 'extends' MWE
This file contains hidden or 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
package MyApp; | |
use Elastic::Model; | |
has_namespace 'myapp' => { | |
user => 'MyApp::EMUser', | |
}; | |
package MyApp::User; | |
use Moose; | |
has 'name' => (is => 'rw', isa => 'Str'); | |
package MyApp::EMUser; | |
use Elastic::Doc; | |
extends 'MyApp::User'; | |
package main; | |
my $model = MyApp->new; | |
__END__ | |
Class (MyApp::EMUser) does not do Elastic::Model::Role::Doc. Please add : use Elastic::Doc; | |
at native delegation method Moose::Meta::Class::__ANON__::SERIAL::7::class_for (get) of attribute doc_class_wrappers (defined at /home/andrefs/.perl5/perls/perl-5.16.1/lib/site_perl/5.16.1/Elastic/Model/Role/Model.pm line 80) line 13. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment