From: Barrie Slaymaker Date: Tue, 13 Nov 2001 12:41:36 +0000 (-0500) Subject: Re: Why *not* use UNIVERSAL qw( isa can ) ; ?? X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=986114cf9bfbae473e57cd7608bd0a8478eec08b;p=p5sagit%2Fp5-mst-13.2.git Re: Why *not* use UNIVERSAL qw( isa can ) ; ?? Message-Id: <20011113124133.C24305@sizzle.whoville.com> p4raw-id: //depot/perl@12976 --- diff --git a/t/op/universal.t b/t/op/universal.t index f8c15d7..00e99fc 100755 --- a/t/op/universal.t +++ b/t/op/universal.t @@ -9,7 +9,7 @@ BEGIN { $| = 1; } -print "1..90\n"; +print "1..91\n"; $a = {}; bless $a, "Bob"; @@ -49,7 +49,7 @@ package main; sub test { print "not " unless $_[0]; print "ok ", $i++; - print "# at ", (caller)[1], ", line ", (caller)[2] unless $_[0]; + print " # at ", (caller)[1], ", line ", (caller)[2] unless $_[0]; print "\n"; } } @@ -68,6 +68,8 @@ test ! $a->isa("Male"); test ! $a->isa('Programmer'); +test $a->isa("HASH"); + test $a->can("eat"); test ! $a->can("sleep"); test my $ref = $a->can("drink"); # returns a coderef