File Coverage

blib/lib/MooseX/Declare/Syntax/MethodDeclaration/Parameterized.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 14 15 93.3


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