EVERYTHING FROM THE OTHER REPO
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package parent;
|
||||
use strict;
|
||||
|
||||
our $VERSION = '0.241';
|
||||
|
||||
sub import {
|
||||
my $class = shift;
|
||||
|
||||
my $inheritor = caller(0);
|
||||
|
||||
if ( @_ and $_[0] eq '-norequire' ) {
|
||||
shift @_;
|
||||
} else {
|
||||
for ( my @filename = @_ ) {
|
||||
s{::|'}{/}g;
|
||||
require "$_.pm"; # dies if the file is not found
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
no strict 'refs';
|
||||
push @{"$inheritor\::ISA"}, @_; # dies if a loop is detected
|
||||
};
|
||||
};
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
Reference in New Issue
Block a user