Component/Attribute/Hook.pm untested

filter: Statementstmt 0.0% 0 / 12 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 22 CC 1 SCAR 6.9
CC
1
Cov
0%
register
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Class::Component::Attribute::Hook;
2  
3 use strict;
4 use warnings;
5 use base 'Class::Component::Attribute';
6  
7 sub register {
8 my($class, $plugin, $c, $method, $value) = @_;
9  
10 $value ||= $method;
11 $c->register_hook( $value => { plugin => $plugin, method => $method } );
12 }
13  
14 1;