Re: [Module::Build] version.pm and version number comparison problem
Status: Beta
Brought to you by:
kwilliams
|
From: Chris D. <ch...@cl...> - 2006-02-03 04:18:19
|
On Feb 2, 2006, at 10:10 PM, Ken Williams wrote:
> On Feb 2, 2006, at 10:22 AM, Chris Dolan wrote:
>
>> On Feb 2, 2006, at 8:06 AM, John Peacock wrote:
>>
>>>
>>> # Unbless it if it's a version.pm object
>>> - $result = "$result" if UNIVERSAL::isa( $result, 'version' );
>>> + $result = $result->numify if UNIVERSAL::isa( $result,
>>> 'version' );
>>
>> While we're at it, we should change the
>> UNIVERSAL::isa( $result, 'version' )
>> to
>> eval { $result->isa('version') }
>
> That's probably better, but it has its own problems. What if
> someone's overloaded isa() object is trying to throw an exception?
> This will throw it away.
Well, if it throws an exception, it's probably not a version
instance, right?
> Personally I think inheritance is a language feature, and we ought
> to have a language feature (like blessed() or tied()), not an
> inheritable method, to inspect it. But other people are more
> passionate about this than me, so I won't argue.
As I've said in another forum, the isa() and can() stuff is just
broken and we can only hope that Perl6 gets it right. I'm grateful
to John Peacock for trying to get version right at least.
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/)
|