File Coverage

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


line stmt bran cond sub pod time code
1             package parent;
2 7     7   211901 use strict;
  7         34  
  7         1406  
3              
4             our $VERSION = '0.239';
5              
6             sub import {
7 17     17   5474 my $class = shift;
8              
9 17         35 my $inheritor = caller(0);
10              
11 17 100 100     102 if ( @_ and $_[0] eq '-norequire' ) {
12 8         15 shift @_;
13             } else {
14 9         33 for ( my @filename = @_ ) {
15 6         27 s{::|'}{/}g;
16 6         1767 require "$_.pm"; # dies if the file is not found
17             }
18             }
19              
20             {
21 7     7   50 no strict 'refs';
  7         14  
  7         576  
  14         51  
22 14         20 push @{"$inheritor\::ISA"}, @_; # dies if a loop is detected
  14         4788  
23             };
24             };
25              
26             1;
27              
28             __END__