From: Mike Guy Date: Thu, 26 Apr 2001 14:22:40 +0000 (+0100) Subject: Re: [PATCH] UNIVERSAL shouldn't require Exporter X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=38242c004862c1bab670bd395f573231149ffa1a;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH] UNIVERSAL shouldn't require Exporter Message-Id: p4raw-id: //depot/perl@9861 --- diff --git a/pod/perlobj.pod b/pod/perlobj.pod index d1938ab..f31ce2c 100644 --- a/pod/perlobj.pod +++ b/pod/perlobj.pod @@ -361,12 +361,12 @@ are inherited by all other classes: C returns I if its object is blessed into a subclass of C -C is also exportable and can be called as a sub with two arguments. This -allows the ability to check what a reference points to. Example +You can also call C as a sub with two arguments. The +first does not need to be an object or even a reference. This +allows the ability to check what a reference points to, or whether +something is a reference of a given type. Example - use UNIVERSAL qw(isa); - - if(isa($ref, 'ARRAY')) { + if(UNIVERSAL::isa($ref, 'ARRAY')) { #... } @@ -397,8 +397,7 @@ strange effects if the Perl code dynamically changes @ISA in any package. You may add other methods to the UNIVERSAL class via Perl or XS code. You do not need to C to make these methods -available to your program. This is necessary only if you wish to -have C available as a plain subroutine in the current package. +available to your program (and you should not do so). =head2 Destructors