tests and such

This commit is contained in:
Doug Bell 2010-05-11 16:05:02 -05:00
parent 5c2581850f
commit e891410075
7 changed files with 254 additions and 3 deletions

View file

@ -235,9 +235,15 @@ sub load {
croak $moduleError{$module};
}
# Check if we already have it
# Try to load the module
my $modulePath = $module . ".pm";
$modulePath =~ s{::|'}{/}g;
if ( $INC{$modulePath} ) {
return 1;
}
if (eval { require $modulePath; 1 }) {
return 1;
}