This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add the verbatim perl code mentioned in the comments of
authorNicholas Clark <nick@ccl4.org>
Wed, 16 Apr 2008 13:15:20 +0000 (13:15 +0000)
committerNicholas Clark <nick@ccl4.org>
Wed, 16 Apr 2008 13:15:20 +0000 (13:15 +0000)
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-05/msg01710.html
but never actually tested.

p4raw-id: //depot/perl@33697

t/op/universal.t

index 9817d3f..83916ee 100755 (executable)
@@ -10,7 +10,7 @@ BEGIN {
     require "./test.pl";
 }
 
-plan tests => 111;
+plan tests => 112;
 
 $a = {};
 bless $a, "Bob";
@@ -228,3 +228,9 @@ package main;
 eval { UNIVERSAL::DOES([], "foo") };
 like( $@, qr/Can't call method "DOES" on unblessed reference/,
     'DOES call error message says DOES, not isa' );
+
+# Tests for can seem to be split between here and method.t
+# Add the verbatim perl code mentioned in the comments of
+# http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-05/msg01710.html
+# but never actually tested.
+is(UNIVERSAL->can("NoSuchPackage::foo"), undef);