Closed p5pRT closed 21 years ago
SYNOPSIS says:
use UNIVERSAL qw( isa can VERSION );
DESCRIPTION says:
These subroutines should not be imported via "use UNIVERSAL qw(...)". If you want simple local access to them you can do
If an import shouldn't be used then it should be said why\, and if imports can be used this paragraph should be dropped (I guess it wasn't implemented but now is).
arthur@contiller.se - Status changed from 'new' to 'open'
It was Tuesday\, April 22\, 2003 when Marc Lehmann took the soap box\, saying: : ----------------------------------------------------------------- : [Please enter your report here] : : SYNOPSIS says: : : use UNIVERSAL qw( isa can VERSION ); : : DESCRIPTION says: : : These subroutines should not be imported via "use UNIVERSAL : qw(...)". If you want simple local access to them you can do : : If an import shouldn't be used then it should be said why\, and if : imports can be used this paragraph should be dropped (I guess it wasn't : implemented but now is).
Your guess is correct. This patch cleans up the documentation to explain the import rules.
Casey West
-- "I loathe people who keep dogs. They are cowards who haven't got the guts to bite people themselves." --August Strindberg
It was Wednesday\, April 23\, 2003 when Robin Barker took the soap box\, saying: : There are also some collision of C\<> and -> in the UNIVERSAL.pm pod. : The attached patch cleans up this and some other bits of the pod. : My patch should be applied as well as (not instead of) Casey's.
As well\, I forgot to address the question of 'if those functions should not be imported\, the documentation should say why'. So to your patch and my previous I add the patch below my signature.
Also\, your patch was a bit hard to apply because it seems that your mailer played wrapping games on it. I've attached a cleaned up copy of your patch.
Casey West
-- I am a superhero.
There are also some collision of C\<> and -> in the UNIVERSAL.pm pod. The attached patch cleans up this and some other bits of the pod. My patch should be applied as well as (not instead of) Casey's.
Robin
--- ../perl@19401/lib/UNIVERSAL.pm Thu Jan 23 14:22:55 2003 +++ lib/UNIVERSAL.pm @@ -41\,20 +41\,42 @@
=over 4
-=item $obj->isa( TYPE )\, CLASS->isa( TYPE )\, isa( VAL\, TYPE ) +=item C\<\< $obj->isa( TYPE ) >>
- C\
When used as a function\, like
@@ -71\,7 +93\,11 @@
unblessed reference to a perl variable of type C\
-=item $obj->can( METHOD )\, CLASS->can( METHOD )\, can( VAL\, METHOD ) +=item C\<\< $obj->can( METHOD ) >> + +=item C\<\< CLASS->can( METHOD ) >> + +=item C\<can( VAL\, METHOD )>
C\
-=item VERSION ( [ REQUIRE ] ) +=item C\<VERSION ( [ REQUIRE ] )>
C\
-C\
=back End of Patch
-----Original Message----- From: Casey West [mailto:casey@geeknest.com] Sent: 23 April 2003 15:04 To: perl5-porters@perl.org Subject: Re: [perl #22018] UNIVERSAL documentation contradicts itself
It was Tuesday\, April 22\, 2003 when Marc Lehmann took the soap box\, saying: : ----------------------------------------------------------------- : [Please enter your report here] : : SYNOPSIS says: : : use UNIVERSAL qw( isa can VERSION ); : : DESCRIPTION says: : : These subroutines should not be imported via "use UNIVERSAL : qw(...)". If you want simple local access to them you can do : : If an import shouldn't be used then it should be said why\, and if : imports can be used this paragraph should be dropped (I guess it wasn't : implemented but now is).
Your guess is correct. This patch cleans up the documentation to explain the import rules.
Casey West
-- "I loathe people who keep dogs. They are cowards who haven't got the guts to bite people themselves." --August Strindberg
qw(...)>>. -If you want simple local access to them you can do +=head1 EXPORTS
- *isa = \&UNIVERSAL::isa; +None by default.
-to import isa into your package.
+You may request the import of all three functions C\
=cut
This e-mail and any attachments may contain confidential and/or privileged material; it is for the intended addressee(s) only. If you are not a named addressee\, you must not use\, retain or disclose such information.
NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses.
NPL Management Ltd. Registered in England and Wales. No: 2937881 Registered Office: Teddington\, Middlesex\, United Kingdom TW11 0LW.
This could go on for some time!
I am stuck behind an exchange server and I haven't learned how to do the right things with line wrapping in patches\, especially if those patches are to reduce paragraphs to \< 80 characters wide! I sent the patch as an attachment in the hope that would be OK.
In reviewing your version of my patch\, I saw a further typo. A repeated "or" was hidden over a line break - my reformatting made it obvious but I missed it.
Another patch\, to be applied after the others:
--- lib/UNIVERSAL.pm.orig
+++ lib/UNIVERSAL.pm
@@ -129\,7 +129\,7 @@
greater than or equal to C\
C\
=back End of patch
Robin
-----Original Message----- From: Casey West [mailto:casey@geeknest.com] Sent: 23 April 2003 15:36 To: Robin Barker Cc: perl5-porters@perl.org; 'casey@geeknest.com' Subject: Re: [PATCH lib/UNIVERSAL.pm] RE: [perl #22018] UNIVERSAL documentatio n contradicts itself
It was Wednesday\, April 23\, 2003 when Robin Barker took the soap box\, saying: : There are also some collision of C\<> and -> in the UNIVERSAL.pm pod. : The attached patch cleans up this and some other bits of the pod. : My patch should be applied as well as (not instead of) Casey's.
As well\, I forgot to address the question of 'if those functions should not be imported\, the documentation should say why'. So to your patch and my previous I add the patch below my signature.
Also\, your patch was a bit hard to apply because it seems that your mailer played wrapping games on it. I've attached a cleaned up copy of your patch.
Casey West
-- I am a superhero.
C
=cut
This e-mail and any attachments may contain confidential and/or privileged material; it is for the intended addressee(s) only. If you are not a named addressee\, you must not use\, retain or disclose such information.
NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses.
NPL Management Ltd. Registered in England and Wales. No: 2937881 Registered Office: Teddington\, Middlesex\, United Kingdom TW11 0LW.
Casey West wrote: [snip]
-You may request the import of all three functions C\
\, C\ \, and C\ . +You may request the import of all three functions (C\ \, C\ \, and +C\ )\, however it isn't necessary to do so. Perl magically makes these +functions act as methods on all objects.
However\, one often needs/wants to use 'isa' as a function\, not as a method... especially if there's a chance that the item being examined isn't blessed. Thus\, one might want to import it.
-- $a=24;split//\,240513;s/\B/ => /for@@=qw(ac ab bc ba cb ca );{push(@b\,$a)\,($a-=6)^=1 for 2..$a/6x--$|;print "$@[$a%6 ]\n";((6\<=($a-=6))?$a+=$_[$a%6]-$a%6:($a=pop @b))&&redo;}
It was Wednesday\, April 23\, 2003 when Benjamin Goldberg took the soap box\, saying:
: Casey West wrote:
: [snip]
: > -You may request the import of all three functions C\
Indeed! Since the patching on top of patching on top of patching has grown rather gruesome I've taken a liberty to compile a complete patch consisting of all the previous ones.
Casey West
-- Hit any user to continue.
Indeed! Since the patching on top of patching on top of patching has grown rather gruesome I've taken a liberty to compile a complete patch consisting of all the previous ones.
Thanks\, applied (change #19348).
-- Jarkko Hietaniemi \jhi@​iki\.fi http://www.iki.fi/jhi/ "There is this special biologist word we use for 'stable'. It is 'dead'." -- Jack Cohen
@jhi - Status changed from 'open' to 'resolved'
Migrated from rt.perl.org#22018 (status was 'resolved')
Searchable as RT22018$