Re: [Module::Build] version.pm and version number comparison problem
Status: Beta
Brought to you by:
kwilliams
|
From: Ken W. <ke...@ma...> - 2006-02-03 04:10:27
|
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.
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.
-Ken
|