require "./test.pl";
}
-plan tests => 135;
+plan tests => 138;
$a = {};
bless $a, "Bob";
};
};
-ok ! UNIVERSAL::can(23, "can");
+ok UNIVERSAL::can(23, "can");
++${"23::foo"};
ok UNIVERSAL::can("23", "can"), '"23" can can when the pack exists';
ok UNIVERSAL::can(23, "can"), '23 can can when the pack exists';
eval 'sub UNIVERSAL::sleep {}';
ok $a->can("sleep");
-ok ! UNIVERSAL::can($b, "can");
+ok UNIVERSAL::can($b, "can");
ok ! $a->can("export_tags"); # a method in Exporter
@RT66112::T6::ISA = qw/RT66112::E/;
ok(RT66112::T6->isa('RT66112::A'), "modify \@ISA in isa (RT66112::T6 isa RT66112::A)");
}
+
+ok(Undeclared->can("can"));
+sub Undeclared::foo { }
+ok(Undeclared->can("foo"));
+ok(!Undeclared->can("something_else"));