File Coverage: lib/Code/Statistics/SlurpyConstructor.pm

# File Coverage

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 | 1 1 1 |  |  | 1 |  | 0 0 0 | use Moose;
7 | 1 1 1 |  |  | 1 |  | 0 0 0 | use Moose::Exporter;
8 | 1 1 1 |  |  | 1 |  | 0 0 0 | use Moose::Util::MetaRole;
9 | 1 1 1 |  |  | 1 |  | 0 0 0 | use Code::Statistics::SlurpyConstructor::Role::Object;
10 | 1 1 1 |  |  | 1 |  | 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 | 2 |  |  | 2 | 1 | 0 | my ( undef, %args ) = @_;
18 |
19 | 2 |  |  |  |  | 0 | Moose->init_meta( %args );
20 |
21 | 2 |  |  |  |  | 0 | my $for_class = $args{ for_class };
22 |
23 | 2 |  |  |  |  | 0 | Moose::Util::MetaRole::apply_metaroles(
24 |  |  |  |  |  |  | for => $for_class,
25 |  |  |  |  |  |  | class_metaroles => {
26 |  |  |  |  |  |  | attribute => ['Code::Statistics::SlurpyConstructor::Role::Attribute'],
27 |  |  |  |  |  |  | },
28 |  |  |  |  |  |  | );
29 |
30 | 2 |  |  |  |  | 0 | Moose::Util::MetaRole::apply_base_class_roles(
31 |  |  |  |  |  |  | for => $for_class,
32 |  |  |  |  |  |  | roles => ['Code::Statistics::SlurpyConstructor::Role::Object'],
33 |  |  |  |  |  |  | );
34 | 2 |  |  |  |  | 0 | return $for_class->meta;
35 |  |  |  |  |  |  | }
36 |
37 | 1 1 1 |  |  | 1 |  | 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