File Coverage

blib/lib/Class/Component/Attribute/Hook.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition 2 3 66.6
subroutine 4 4 100.0
pod 0 1 0.0
total 18 20 90.0


line stmt bran cond sub pod time code
1             package Class::Component::Attribute::Hook;
2              
3 12     12   72 use strict;
  12         30  
  12         431  
4 12     12   64 use warnings;
  12         39  
  12         351  
5 12     12   68 use base 'Class::Component::Attribute';
  12         24  
  12         2357  
6              
7             sub register {
8 38     38 0 94 my($class, $plugin, $c, $method, $value) = @_;
9              
10 38   66     105 $value ||= $method;
11 38         309 $c->register_hook( $value => { plugin => $plugin, method => $method } );
12             }
13              
14             1;