summaryrefslogtreecommitdiff
path: root/pod/perlobj.pod
diff options
context:
space:
mode:
authorMike Guy <mjtg@cam.ac.uk>2001-04-26 15:22:40 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2001-04-26 18:56:14 +0000
commit38242c004862c1bab670bd395f573231149ffa1a (patch)
tree1349091d6cee7be8bb60a6d7517eedba1fb2b845 /pod/perlobj.pod
parent3f766ba313fac08361667b38ebc1ca30388db1c3 (diff)
downloadperl-38242c004862c1bab670bd395f573231149ffa1a.tar.gz
Re: [PATCH] UNIVERSAL shouldn't require Exporter
Message-Id: <E14sljE-0003X9-00@libra.cus.cam.ac.uk> p4raw-id: //depot/perl@9861
Diffstat (limited to 'pod/perlobj.pod')
-rw-r--r--pod/perlobj.pod13
1 files changed, 6 insertions, 7 deletions
diff --git a/pod/perlobj.pod b/pod/perlobj.pod
index d1938ab428..f31ce2c993 100644
--- a/pod/perlobj.pod
+++ b/pod/perlobj.pod
@@ -361,12 +361,12 @@ are inherited by all other classes:
C<isa> returns I<true> if its object is blessed into a subclass of C<CLASS>
-C<isa> 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<UNIVERSAL::isa> 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<use UNIVERSAL> to make these methods
-available to your program. This is necessary only if you wish to
-have C<isa> available as a plain subroutine in the current package.
+available to your program (and you should not do so).
=head2 Destructors