%modules = (
# ModuleName => q| code to check that it was loaded |,
+ 'List::Util' => q| ::is( ref List::Util->can('first'), 'CODE' ) |, # 5.7.2
'Cwd' => q| ::is( ref Cwd->can('fastcwd'),'CODE' ) |, # 5.7 ?
'File::Glob' => q| ::is( ref File::Glob->can('doglob'),'CODE' ) |, # 5.6
$db_file => q| ::is( ref $db_file->can('TIEHASH'), 'CODE' ) |, # 5.0
'Time::HiRes'=> q| ::is( ref Time::HiRes->can('usleep'),'CODE' ) |, # 5.7.3
);
-plan tests => 27 + keys(%modules) * 2;
+plan tests => 22 + keys(%modules) * 3;
# Try to load the module
package overload;
-our $VERSION = '1.05';
+our $VERSION = '1.06';
sub nil {}
sub Method {
my $package = shift;
- $package = ref $package if ref $package;
+ if(ref $package) {
+ require Scalar::Util;
+ $package = Scalar::Util::blessed($package);
+ return undef if !defined $package;
+ }
#my $meth = $package->can('(' . shift);
ov_method mycan($package, '(' . shift), $package;
#return $meth if $meth ne \&nil;