File Coverage

blib/lib/MooseX/MethodAttributes/Role/AttrContainer/Inheritable.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package MooseX::MethodAttributes::Role::AttrContainer::Inheritable;
2             # ABSTRACT: capture code attributes in the automatically initialized metaclass instance
3              
4             our $VERSION = '0.30';
5              
6             #pod =head1 DESCRIPTION
7             #pod
8             #pod This role extends C<MooseX::MethodAttributes::Role::AttrContainer> with the
9             #pod functionality of automatically initializing a metaclass for the caller and
10             #pod applying the meta roles relevant for capturing method attributes.
11             #pod
12             #pod =cut
13              
14 11     11   2679896 use Moose::Role;
  11         25  
  11         211  
15 11     11   61917 use MooseX::MethodAttributes ();
  11         32  
  11         246  
16              
17 11     11   66 use namespace::autoclean;
  11         20  
  11         97  
18              
19             with 'MooseX::MethodAttributes::Role::AttrContainer';
20              
21             before MODIFY_CODE_ATTRIBUTES => sub {
22             my ($class, $code, @attrs) = @_;
23             return unless @attrs;
24             MooseX::MethodAttributes->init_meta( for_class => $class );
25             };
26              
27             1;
28              
29             __END__
30              
31             =pod
32              
33             =encoding UTF-8
34              
35             =head1 NAME
36              
37             MooseX::MethodAttributes::Role::AttrContainer::Inheritable - capture code attributes in the automatically initialized metaclass instance
38              
39             =head1 VERSION
40              
41             version 0.30
42              
43             =head1 DESCRIPTION
44              
45             This role extends C<MooseX::MethodAttributes::Role::AttrContainer> with the
46             functionality of automatically initializing a metaclass for the caller and
47             applying the meta roles relevant for capturing method attributes.
48              
49             =head1 AUTHORS
50              
51             =over 4
52              
53             =item *
54              
55             Florian Ragwitz <rafl@debian.org>
56              
57             =item *
58              
59             Tomas Doran <bobtfish@bobtfish.net>
60              
61             =back
62              
63             =head1 COPYRIGHT AND LICENSE
64              
65             This software is copyright (c) 2009 by Florian Ragwitz.
66              
67             This is free software; you can redistribute it and/or modify it under
68             the same terms as the Perl 5 programming language system itself.
69              
70             =cut