my $blam = [ 42 ];
my $class = 'Bar';
my $blam2 = '';
+my $undef;
# basic isa usage -
ok($class->isa('Foo'), 'class name isa Foo');
ok(!eval { $blam->isa('Foo'); 1 }, 'blam goes blam with isa');
ok(!eval { $blam2->isa('Foo'); 1 }, 'blam2 goes blam with isa');
+ok(!eval { $undef->isa('Foo'); 1 }, 'undef goes blam with isa');
ok(!$foo->can('bar'), 'foo !can bar');
ok($bar->can('bar'), 'bar can bar');
ok($class->can('bar'), 'our class name can bar');
ok(!eval { $blam->can('bar'); 1 }, 'blam goes blam with can');
ok(!eval { $blam2->can('bar'); 1 }, 'blam2 goes blam with can');
+ok(!eval { $undef->can('bar'); 1 }, 'undef goes blam with can');
use Safe::Isa;
ok($class->$_isa('Foo'), 'class name $_isa Foo');
ok(eval { $blam->$_isa('Foo'); 1 }, 'no boom today with isa');
ok(eval { $blam2->$_isa('Foo'); 1 }, 'no boom today with isa');
+ok(eval { $undef->$_isa('Foo'); 1 }, 'no boom today with isa');
ok(!$foo->$_can('bar'), 'foo !$_can bar');
ok($bar->$_can('bar'), 'bar $_can bar');
ok($class->$_can('bar'), 'class name $_can bar');
ok(eval { $blam->$_can('bar'); 1 }, 'no boom today with can');
ok(eval { $blam2->$_can('bar'); 1 }, 'no boom today with can');
+ok(eval { $undef->$_can('bar'); 1 }, 'no boom today with can');
ok($foo->$_call_if_object(isa => 'Foo'), 'foo $_call_if_object(isa => Foo)');
ok($bar->$_call_if_object(isa => 'Foo'), 'bar $_call_if_object(isa => Foo)');
ok($class->$_call_if_object_or_classname(isa => 'Foo'), 'class name $_call_if_object_or_classname(isa => Foo)');
ok(eval { $blam->$_call_if_object_or_classname(isa => 'Foo'); 1 }, 'no boom today with _call_if_object_or_classname');
ok(eval { $blam2->$_call_if_object_or_classname(isa => 'Foo'); 1 }, 'no boom today with _call_if_object_or_classname');
+ok(eval { $undef->$_call_if_object_or_classname(isa => 'Foo'); 1 }, 'no boom today with _call_if_object_or_classname');