line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
4135
|
use 5.006; # our, pragmas |
|
2
|
|
|
|
|
5
|
|
2
|
2
|
|
|
2
|
|
7
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
38
|
|
3
|
2
|
|
|
2
|
|
7
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
116
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package MooseX::AttributeIndexes::Meta::Role::ApplicationToRole; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '2.000000'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Give a role indexable attributes |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
12
|
|
|
|
|
|
|
|
13
|
2
|
|
|
2
|
|
401
|
use Moose::Role qw( around ); |
|
2
|
|
|
|
|
322497
|
|
|
2
|
|
|
|
|
12
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
around apply => sub { |
16
|
|
|
|
|
|
|
my $orig = shift; |
17
|
|
|
|
|
|
|
my $self = shift; |
18
|
|
|
|
|
|
|
my ( $consumee, $consumer ) = @_; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# applying $consumee to $consumer, $consumee has AttributeIndexes. |
21
|
|
|
|
|
|
|
# -> $consumer inherits indexable attributes. |
22
|
|
|
|
|
|
|
$consumer = Moose::Util::MetaRole::apply_metaroles( |
23
|
|
|
|
|
|
|
for => $consumer, |
24
|
|
|
|
|
|
|
role_metaroles => { |
25
|
|
|
|
|
|
|
application_to_class => [ 'MooseX::AttributeIndexes::Meta::Role::ApplicationToClass', ], |
26
|
|
|
|
|
|
|
application_to_role => [ 'MooseX::AttributeIndexes::Meta::Role::ApplicationToRole', ], |
27
|
|
|
|
|
|
|
}, |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
$self->$orig( $consumee, $consumer ); |
31
|
|
|
|
|
|
|
}; |
32
|
|
|
|
|
|
|
|
33
|
2
|
|
|
2
|
|
5803
|
no Moose::Role; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
10
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=pod |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=encoding UTF-8 |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 NAME |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
MooseX::AttributeIndexes::Meta::Role::ApplicationToRole - Give a role indexable attributes |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 VERSION |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
version 2.000000 |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 AUTHORS |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=over 4 |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=item * |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Kent Fredric <kentnl@cpan.org> |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=item * |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Jesse Luehrs <doy@cpan.org> |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=back |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
This software is copyright (c) 2014 by Kent Fredric <kentfredric@gmail.com>. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
70
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |