File Coverage

blib/lib/parent.pm
Criterion Covered Total %
statement 17 17 100.0
branch 2 2 100.0
condition 3 3 100.0
subroutine 3 3 100.0
pod n/a
total 25 25 100.0


line stmt bran cond sub pod time code
1             package parent;
2 10     10   1737454 use strict;
  10         18  
  10         1915  
3              
4             our $VERSION = '0.244';
5              
6             sub import {
7 48     48   670832 my $class = shift;
8              
9 48         118 my $inheritor = caller(0);
10              
11 48 100 100     315 if ( @_ and $_[0] eq '-norequire' ) {
12 8         20 shift @_;
13             } else {
14 40         169 for ( my @filename = @_ ) {
15 38         1361 local @_; # protect us against the loaded module changing @_
16 38         278 s{::|'}{/}g;
17 38         8228 require "$_.pm"; # dies if the file is not found
18             }
19             }
20              
21             {
22 10     10   69 no strict 'refs';
  10         21  
  10         1021  
  45         9192  
23 45         66 push @{"$inheritor\::ISA"}, @_; # dies if a loop is detected
  45         10994  
24             };
25             };
26              
27             1;
28              
29             __END__