| 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 | has_non_attribute_mapping | ||
| 16 | )], | ||
| 17 | class_metaroles => { | ||
| 18 | class => [ | ||
| 19 | 'Elasticsearch::Model::Document::Role::Metaclass', | ||
| 20 | ] | ||
| 21 | }, | ||
| 22 | ); | ||
| 23 | |||
| 24 | 18 | ▶ | sub has { shift->add_property(@_) } |
|
Subroutine
has: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 25 | |||
| 26 | sub init_meta { | ||
| 27 | 6 | ▶ | my $class = shift; |
|
Subroutine
init_meta: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 28 | 6 | my %p = @_; | |
| 29 | |||
| 30 | Moose::Util::ensure_all_roles( | ||
| 31 | $p{for_class}, | ||
| 32 | 6 | qw(Elasticsearch::Model::Document::Role) | |
| 33 | ); | ||
| 34 | |||
| 35 | 6 | $class->$init_meta(%p); | |
| 36 | } | ||
| 37 | |||
| 38 | sub has_non_attribute_mapping { | ||
| 39 | 1 | ▶ | my ($self,$mapping) = @_; |
|
Subroutine
has_non_attribute_mapping: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 40 | 1 | $self->non_attribute_mapping($mapping); | |
| 41 | } | ||
| 42 | |||
| 43 | 1 | 1; | |
| 44 | |||