diff options
author | chromatic <chromatic@wgz.org> | 2005-06-18 05:15:41 -0700 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-06-20 11:45:02 +0000 |
commit | da279afeb837e7a711e0ba9bd4b5d1fee73608ef (patch) | |
tree | 51d65c3ba8497ca33a3af8a79167fa9a474d41bb /pod/perltooc.pod | |
parent | 8ae1fe26cb95d1274fd14fd03b3c3d0928a2403f (diff) | |
download | perl-da279afeb837e7a711e0ba9bd4b5d1fee73608ef.tar.gz |
Recommend Against UNIVERSAL:: Methods as Functions, take 2
Message-Id: <1119122141.21521.9.camel@localhost>
p4raw-id: //depot/perl@24909
Diffstat (limited to 'pod/perltooc.pod')
-rw-r--r-- | pod/perltooc.pod | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pod/perltooc.pod b/pod/perltooc.pod index 6737105011..06f697cdef 100644 --- a/pod/perltooc.pod +++ b/pod/perltooc.pod @@ -1089,7 +1089,10 @@ for a significant performance improvement: if (my $coderef = $self->can($parent . "::CData1")) { $self->$coderef($newvalue); } - } + } + +If you override C<UNIVERSAL::can> in your own classes, be sure to return the +reference appropriately. =head2 Locking the Door and Throwing Away the Key |