| File: | lib/Code/Statistics/SlurpyConstructor.pm |
| Coverage: | 100.0% |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | ## no critic | ||||||
| 2 | package Code::Statistics::SlurpyConstructor; | ||||||
| 3 | |||||||
| 4 | # ABSTRACT: temporary clone of MooseX::SlurpyConstructor with some fixes | ||||||
| 5 | |||||||
| 6 | 2 2 2 | 0 0 0 | use Moose; | ||||
| 7 | 2 2 2 | 0 0 0 | use Moose::Exporter; | ||||
| 8 | 2 2 2 | 0 0 0 | use Moose::Util::MetaRole; | ||||
| 9 | 2 2 2 | 0 15625 0 | use Code::Statistics::SlurpyConstructor::Role::Object; | ||||
| 10 | 2 2 2 | 0 0 0 | use Code::Statistics::SlurpyConstructor::Role::Attribute; | ||||
| 11 | |||||||
| 12 | Moose::Exporter->setup_import_methods; | ||||||
| 13 | |||||||
| 14 - 15 | =head2 init_meta =cut | ||||||
| 16 | sub init_meta { | ||||||
| 17 | 4 | 1 | 0 | my ( undef, %args ) = @_; | |||
| 18 | |||||||
| 19 | 4 | 0 | Moose->init_meta( %args ); | ||||
| 20 | |||||||
| 21 | 4 | 0 | my $for_class = $args{ for_class }; | ||||
| 22 | |||||||
| 23 | 4 | 0 | Moose::Util::MetaRole::apply_metaroles( | ||||
| 24 | for => $for_class, | ||||||
| 25 | class_metaroles => { | ||||||
| 26 | attribute => ['Code::Statistics::SlurpyConstructor::Role::Attribute'], | ||||||
| 27 | }, | ||||||
| 28 | ); | ||||||
| 29 | |||||||
| 30 | 4 | 0 | Moose::Util::MetaRole::apply_base_class_roles( | ||||
| 31 | for => $for_class, | ||||||
| 32 | roles => ['Code::Statistics::SlurpyConstructor::Role::Object'], | ||||||
| 33 | ); | ||||||
| 34 | 4 | 0 | return $for_class->meta; | ||||
| 35 | } | ||||||
| 36 | |||||||
| 37 | 2 2 2 | 0 0 0 | no Moose; | ||||
| 38 | |||||||
| 39 | __PACKAGE__->meta->make_immutable; | ||||||
| 40 | |||||||
| 41 - 55 | =pod =head1 NAME Code::Statistics::SlurpyConstructor - L<MooseX::SlurpyConstructor> with a few temporary fixes =head1 SEE ALSO =over 4 =item L<MooseX::SlurpyConstructor> =back =cut | ||||||