perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: version syntax for mp2
Date Mon, 13 Dec 2004 16:17:13 GMT
John Peacock wrote:
> Stas Bekman wrote:
> 
> Sorry, I wasn't clear in my explanation of what I was proposing (but it 
> may not matter, as you say below).
> 
>>> if ( $mod_perl::VERSION > 2.000 ) # this is now an overloaded comparison
>>
>>
>>
>> that won't work, simply because there is no mod_perl2 (only mod_perl) 
>> and mod_perl.pm coming with mp1 won't have version() bundled, so 
>> mod_perl->new will fail.
> 
> 
> What I was saying was that the $mod_perl object (wherever that is 
> created) is currently used to test the package $VERSION that mod_perl is 
> reporting, correct?  If that scalar is defined as an overloaded object
> of type Mod_Perl::VERSION (but only in the 2.x series), then the normal 
> comparison operation will be overloaded by the version comparison code, 
> and hence will Do The Right Thing(TM) regardless of Perl version and 
> presence of absence of the version.pm module itself.

I guess not, since there is no $mod_perl object. mod_perl.pm has nothing 
but $VERSION in it.

>> right, mod_perl-2.0000001.tar.gz certainly doesn't look good. But 
>> that's easily fixable, by making Makefile.PL pass version as "2.0.0" 
>> as WriteMakefile(VERSION => "2.0.0"). Then have:
>>
>> $mod_perl::VERSION = 2.000_000;
>>
>> and having users use the conditions from above to do the checking.
>>
>> in fact I think we can switch to that style right now and move to 
>> 1.099_018, so moving from RCX to 2.0.0 will be even easier and already 
>> tested well.
> 
> 
> That's really my best recommendation.  Much as I'd like to see 
> version.pm adopted by such a high profile project as mod_perl, there is 
> little benefit to your project because of all the hoops that have to be 
> jumped through because of the v-string issues from 5.6.0-5.8.0.  Just 
> tell people to use the full FP notation for their testing:
> 
>     $mod_perl::VERSION > 2.002_001;
> 
> and it will work for you.

Sounds good. Let's give it a try with RC2 and see if there any any problems.

thanks a lot, John, for your very helpful comments. And I hope that 
version.pm gets adopted!


-- 
__________________________________________________________________
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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message