From: Nicholas Clark Date: Wed, 16 Apr 2008 13:15:20 +0000 (+0000) Subject: Add the verbatim perl code mentioned in the comments of X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b91ba1f24f52edc181821f93840733a1b39a2451;p=p5sagit%2Fp5-mst-13.2.git 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. p4raw-id: //depot/perl@33697 --- diff --git a/t/op/universal.t b/t/op/universal.t index 9817d3f..83916ee 100755 --- a/t/op/universal.t +++ b/t/op/universal.t @@ -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);