| 1 | package Elasticsearch::Model::Document; | ||
| 2 | |||
| 3 | 1 | ▶ | use Moose (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 1 | ▶ | use Moose::Exporter; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | ▶ | use Elasticsearch::Model::Document::Role::Metaclass; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 1 | my (undef, undef, $init_meta) = Moose::Exporter->build_import_methods( | |
| 9 | install => [qw( | ||
| 10 | import | ||
| 11 | unimport | ||
| 12 | )], | ||
| 13 | with_meta => [qw( | ||
| 14 | has | ||
| 15 | )], | ||
| 16 | class_metaroles => { | ||
| 17 | class => [ | ||
| 18 | 'Elasticsearch::Model::Document::Role::Metaclass', | ||
| 19 | ] | ||
| 20 | }, | ||
| 21 | ); | ||
| 22 | |||
| 23 | 18 | ▶ | sub has { shift->add_property(@_) } |
|
Subroutine
has: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 24 | |||
| 25 | sub init_meta { | ||
| 26 | 6 | ▶ | my $class = shift; |
|
Subroutine
init_meta: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 27 | 6 | my %p = @_; | |
| 28 | |||
| 29 | Moose::Util::ensure_all_roles( | ||
| 30 | $p{for_class}, | ||
| 31 | 6 | qw(Elasticsearch::Model::Document::Role) | |
| 32 | ); | ||
| 33 | |||
| 34 | 6 | $class->$init_meta(%p); | |
| 35 | } | ||
| 36 | |||
| 37 | 1 | 1; | |
| 38 | |||