Perlito5X/parent.pm untested

filter: Statementstmt 0.0% 0 / 23 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 36 CC 2 SCAR 12.0
CC
2
Cov
0%
import
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.3
1 package parent;
2 use strict;
3 use vars qw($VERSION);
4 $VERSION = '0.236';
5  
6 sub import {
7 my $class = shift;
8  
9 my $inheritor = caller(0);
10  
11 if ( @_ and $_[0] eq '-norequire' ) {
12 shift @_;
13 } else {
14 for ( my @filename = @_ ) {
15 s{::|'}{/}g;
16 require "$_.pm"; # dies if the file is not found
17 }
18 }
19  
20 {
21 no strict 'refs';
22 push @{"$inheritor\::ISA"}, @_; # dies if a loop is detected
23 };
24 };
25  
26 1;
27  
28 __END__