File Coverage

blib/lib/HTTP/MobileAttribute/Attribute/CarrierMethod.pm
Criterion Covered Total %
statement 15 15 100.0
branch 6 6 100.0
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 25 26 96.1


line stmt bran cond sub pod time code
1             package HTTP::MobileAttribute::Attribute::CarrierMethod;
2 21     21   21649 use strict;
  21         51  
  21         761  
3 21     21   110 use warnings;
  21         50  
  21         573  
4 21     21   124 use base 'Class::Component::Attribute';
  21         47  
  21         4298  
5              
6             sub register {
7 845     845 0 28364 my ( $class, $plugin, $c, $method, $param, $code ) = @_;
8              
9 845 100       1800 if (ref $param) {
10 380 100       5401 return unless $c =~ $param->[0];
11 76         692 $c->register_method( $param->[1] => { plugin => $plugin, method => $method } );
12             } else {
13 465 100       3586 return unless $c =~ $param;
14 93         592 $c->register_method( $method => $plugin );
15             }
16             }
17              
18             1;
19              
20             __END__