You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by Geoffrey Young <ge...@modperlcookbook.org> on 2004/01/08 19:44:32 UTC
Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache
Test.pm TestConfigC.pm TestSSLCA.pm
>> - my $has_version = $module->VERSION || 0;
>> - return 1 if $has_version >= $version;
>> + return 1 if eval { $module->VERSION($version) };
>
>
> Are you sure you haven't dropped something here? why did you remove the
> comparison line?
becuase it's both wrong and unnecessary:
VERSION ( [ REQUIRE ] )
"VERSION" will return the value of the variable $VERSION in the
package the object is blessed into. If "REQUIRE" is given then it
will do a comparison and die if the package version is not reater
than or equal to "REQUIRE".
--Geoff
Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache
Test.pm TestConfigC.pm TestSSLCA.pm
Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
>>> - my $has_version = $module->VERSION || 0;
>>> - return 1 if $has_version >= $version;
>>> + return 1 if eval { $module->VERSION($version) };
>>
>>
>>Are you sure you haven't dropped something here? why did you remove the
>>comparison line?
>
>
> becuase it's both wrong and unnecessary:
>
> VERSION ( [ REQUIRE ] )
> "VERSION" will return the value of the variable $VERSION in the
> package the object is blessed into. If "REQUIRE" is given then it
> will do a comparison and die if the package version is not reater
> than or equal to "REQUIRE".
Cool. I've learned a new thing then. Thanks Geoff.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com