use vars qw($VERSION @ISA @EXPORT %EXPORT_TAGS $TODO);
-$VERSION = '0.61';
+$VERSION = '0.63';
$VERSION = eval $VERSION; # make the alpha version come out as a number
use Test::Builder::Module;
my $class = ref $proto || $proto;
my $tb = Test::More->builder;
+ unless( $class ) {
+ my $ok = $tb->ok( 0, "->can(...)" );
+ $tb->diag(' can_ok() called with empty class or reference');
+ return $ok;
+ }
+
unless( @methods ) {
my $ok = $tb->ok( 0, "$class->can(...)" );
$tb->diag(' can_ok() called with no methods');
references themselves (except for their type) are ignored. This means
aspects such as blessing and ties are not considered "different".
+is_deeply() current has very limited handling of function reference
+and globs. It merely checks if they have the same referent. This may
+improve in the future.
+
Test::Differences and Test::Deep provide more in-depth functionality
along these lines.
return '' if !ref $thing;
- for my $type (qw(ARRAY HASH REF SCALAR GLOB Regexp)) {
+ for my $type (qw(ARRAY HASH REF SCALAR GLOB CODE Regexp)) {
return $type if UNIVERSAL::isa($thing, $type);
}
BAIL_OUT($reason);
-Incidates to the harness that things are going so badly all testing
+Indicates to the harness that things are going so badly all testing
should terminate. This includes the running any additional test scripts.
This is typically used when testing cannot continue such as a critical
$ok = _deep_check($$e1, $$e2);
pop @Data_Stack if $ok;
}
+ elsif( $type ) {
+ push @Data_Stack, { type => $type, vals => [$e1, $e2] };
+ $ok = 0;
+ }
else {
_whoa(1, "No type in _deep_check");
}