blob: 06aac71f719834b58c7e37ddd3d0e3d6c1e7938f [file] [log] [blame]
Rashed Abdel-Tawab4db47f42019-09-06 10:38:22 -07001package parent;
2use strict;
3use vars qw($VERSION);
4$VERSION = '0.236';
5
6sub 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
261;
27
28__END__
29