From b91ba1f24f52edc181821f93840733a1b39a2451 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Wed, 16 Apr 2008 13:15:20 +0000 Subject: 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 --- t/op/universal.t | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 't') diff --git a/t/op/universal.t b/t/op/universal.t index 9817d3fe68..83916ee5f5 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); -- cgit v1.2.1