line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package # hide from PAUSE |
2
|
|
|
|
|
|
|
MooseX::Declare::Syntax::MethodDeclaration::Parameterized; |
3
|
|
|
|
|
|
|
|
4
|
24
|
|
|
24
|
|
11225
|
use Moose::Role; |
|
24
|
|
|
|
|
46
|
|
|
24
|
|
|
|
|
183
|
|
5
|
|
|
|
|
|
|
# we actually require MXRP 1.06 if versions 1.03,1.04,1.05 are installed |
6
|
|
|
|
|
|
|
# (which is where current_metaclass was removed from the API), but this was |
7
|
|
|
|
|
|
|
# only in the wild for a short time, so it's not worth creating a dynamic |
8
|
|
|
|
|
|
|
# prereq for. |
9
|
24
|
|
|
24
|
|
106123
|
use MooseX::Role::Parameterized 0.12 (); |
|
24
|
|
|
|
|
986294
|
|
|
24
|
|
|
|
|
718
|
|
10
|
24
|
|
|
24
|
|
185
|
use namespace::autoclean; |
|
24
|
|
|
|
|
41
|
|
|
24
|
|
|
|
|
111
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
around register_method_declaration => sub { |
13
|
|
|
|
|
|
|
my ($next, $self, $parameterizable_meta, $name, $method) = @_; |
14
|
|
|
|
|
|
|
my $meta = $self->metaclass_for_method_application($parameterizable_meta, $name, $method); |
15
|
|
|
|
|
|
|
$self->$next($meta, $name, $method); |
16
|
|
|
|
|
|
|
}; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub metaclass_for_method_application { |
19
|
6
|
|
|
6
|
0
|
29
|
return MooseX::Role::Parameterized->current_metaclass; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |