Re: [Module::Build] version.pm and version number comparison problem
Status: Beta
Brought to you by:
kwilliams
|
From: Chris D. <ch...@cl...> - 2006-02-02 22:04:50
|
On Feb 2, 2006, at 3:10 PM, Julian Mehnle wrote:
> All that doesn't help much as long as the "UNIVERSAL" POD is part
> of the
> official Perl distribution, while the "UNIVERSAL::isa" POD is not.
> This
> makes the "UNIVERSAL" POD look authoritative, not the other POD.
>
> Besides, the "UNIVERSAL::isa" POD doesn't explain the issue very
> well, see
> above. And why is it titled "Hack around people calling
> UNIVERSAL::can()
> as a function" if it is supposed to actually _improve_ code, which
> is not
> normally the case with _hacks_?
Look again at Perl 5.8.8 or 5.9.3. The UNIVERSAL.pm POD was updated
(by chromatic, I think, a month or two ago) to reflect the current
accepted best practice. To quote:
"UNIVERSAL" provides the following methods:
"$obj->isa( TYPE )"
"CLASS->isa( TYPE )"
"eval { VAL->isa( TYPE ) }"
[... snip ...]
You may request the import of all three functions ("isa",
"can", and
"VERSION"), however it is usually harmful to do so. Please
don't do
this in new code.
Chris
--
Chris Dolan, Software Developer, Clotho Advanced Media Inc.
608-294-7900, fax 294-7025, 1435 E Main St, Madison WI 53703
vCard: http://www.chrisdolan.net/ChrisDolan.vcf
Clotho Advanced Media, Inc. - Creators of MediaLandscape Software
(http://www.media-landscape.com/) and partners in the revolutionary
Croquet project (http://www.opencroquet.org/)
|