You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2005/05/10 05:08:43 UTC

[mp2] problems with mod_perl2.pm fooling around with mod_perl.pm in %INC

Anybody can tell me why the following code was added?

% cat lib/mod_perl2.pm
[...]
# this stuff is here to assist back compat
# basically, if you
#  PerlModule mod_perl2
# or take similar steps to load mod_perl2 at
# startup you are protected against loading mod_perl.pm
# (either 1.0 or 1.99) at a later time by accident.
$mod_perl::VERSION = $mod_perl2::VERSION;
$INC{"mod_perl.pm"} = __FILE__;

This breaks any detection mechanism, e.g. it broke libapreq1:
http://marc.theaimsgroup.com/?l=apache-modperl&m=111569421220736&w=2

Any chance this can be removed?

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


Re: [mp2] problems with mod_perl2.pm fooling around with mod_perl.pm in %INC

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Stas Bekman wrote:

> Philip M. Golllucci wrote:
>
>> Stas Bekman wrote:
>>
>>> Philip M. Golllucci wrote:
>>>
>>>> Stas Bekman wrote:
>>>
>>>
>>> Do you have a URL to this discussion?
>>
>>
>> http://gossamer-threads.com/lists/modperl/dev/80422
>
>
> I didn't participate in the rename process, so I didn't try to suggest 
> things other than a better documentation of the reasons. Now that it's 
> clear that it's a bad thing, I think it should be removed.
>
> >> Stas, I actually wanted to change that to
> >> $INC{mod_perl2.pm} = __FILE__
> >
> > but won't that already be set, since this file was already required?
>
> what about this part?
>
If you're asking me specifically, I'm all for removing it instead of my 
initially suggested change.
I believe what happened here is exactly what Geoff said that we are 
revisting it now that things are "stabalizing".

+1



-- 
END
-----------------------------------------------------------------------------
Philip M. Gollucci
Senior Developer - Liquidity Services Inc.
Phone:  202.558.6268 (Direct)
E-Mail: pgollucci@liquidation.com
Web:    http://www.liquidation.com


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


Re: [mp2] problems with mod_perl2.pm fooling around with mod_perl.pm in %INC

Posted by Stas Bekman <st...@stason.org>.
Philip M. Golllucci wrote:
> Stas Bekman wrote:
> 
>> Philip M. Golllucci wrote:
>>
>>> Stas Bekman wrote:
>>
>> Do you have a URL to this discussion?
> 
> http://gossamer-threads.com/lists/modperl/dev/80422

I didn't participate in the rename process, so I didn't try to suggest 
things other than a better documentation of the reasons. Now that it's 
clear that it's a bad thing, I think it should be removed.

 >> Stas, I actually wanted to change that to
 >> $INC{mod_perl2.pm} = __FILE__
 >
 > but won't that already be set, since this file was already required?

what about this part?

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


Re: [mp2] problems with mod_perl2.pm fooling around with mod_perl.pm in %INC

Posted by "Philip M. Golllucci" <pg...@p6m7g8.com>.
Stas Bekman wrote:
> Philip M. Golllucci wrote:
> 
>> Stas Bekman wrote:
> Do you have a URL to this discussion?
http://gossamer-threads.com/lists/modperl/dev/80422

HTH

-- 
END
------------------------------------------------------------------------------ 

Philip M. Gollucci
Consultant
E-Mail: pgollucci@p6m7g8.com
URL   : http://p6m7g8.net/Resume/resume.shtml
Phone : 301.254.5198

$Id: .signature,v 1.7 2004/09/05 23:46:37 philip Exp $


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


Re: [mp2] problems with mod_perl2.pm fooling around with mod_perl.pm in %INC

Posted by Stas Bekman <st...@stason.org>.
Philip M. Golllucci wrote:
> Stas Bekman wrote:
> 
>> Anybody can tell me why the following code was added?
>>
>> % cat lib/mod_perl2.pm
>> [...]
>> # this stuff is here to assist back compat
>> # basically, if you
>> #  PerlModule mod_perl2
>> # or take similar steps to load mod_perl2 at
>> # startup you are protected against loading mod_perl.pm
>> # (either 1.0 or 1.99) at a later time by accident.
>> $mod_perl::VERSION = $mod_perl2::VERSION;
>> $INC{"mod_perl.pm"} = __FILE__;
>>
>> This breaks any detection mechanism, e.g. it broke libapreq1:
>> http://marc.theaimsgroup.com/?l=apache-modperl&m=111569421220736&w=2
>>
>> Any chance this can be removed?
>>
> Hi all,
> 
> Stas, I actually wanted to change that to
> $INC{mod_perl2.pm} = __FILE__

but won't that already be set, since this file was already required?

> Both you and Geoff caught me and said no, that this was there and 
> correct to prevent accidental loading of mp1 by later doing
> 'use mod_perl' If you had mp1 and mp2 in the same perl tree.  You then 
> suggested that based on Geoff's response to me
> that the comment above that be added.  Its about 1-2 months ago in the 
> archives of -dev

Do you have a URL to this discussion?

> My originall reason for chaning it was the output of Apache2::Status 
> which listed mod_perl.pm as version 1.999.xx which confused the hell out 
> of me because I thought it was going to be 1.29 or whatever mp1 is at 
> right now havn't looked in a while.

As it breaks code, it's probably not the right thing to do.


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


Re: [mp2] problems with mod_perl2.pm fooling around with mod_perl.pm in %INC

Posted by "Philip M. Golllucci" <pg...@p6m7g8.com>.
Stas Bekman wrote:
> Anybody can tell me why the following code was added?
> 
> % cat lib/mod_perl2.pm
> [...]
> # this stuff is here to assist back compat
> # basically, if you
> #  PerlModule mod_perl2
> # or take similar steps to load mod_perl2 at
> # startup you are protected against loading mod_perl.pm
> # (either 1.0 or 1.99) at a later time by accident.
> $mod_perl::VERSION = $mod_perl2::VERSION;
> $INC{"mod_perl.pm"} = __FILE__;
> 
> This breaks any detection mechanism, e.g. it broke libapreq1:
> http://marc.theaimsgroup.com/?l=apache-modperl&m=111569421220736&w=2
> 
> Any chance this can be removed?
> 
Hi all,

Stas, I actually wanted to change that to
$INC{mod_perl2.pm} = __FILE__

Both you and Geoff caught me and said no, that this was there and 
correct to prevent accidental loading of mp1 by later doing
'use mod_perl' If you had mp1 and mp2 in the same perl tree.  You then 
suggested that based on Geoff's response to me
that the comment above that be added.  Its about 1-2 months ago in the 
archives of -dev

My originall reason for chaning it was the output of Apache2::Status 
which listed mod_perl.pm as version 1.999.xx which confused the hell out 
of me because I thought it was going to be 1.29 or whatever mp1 is at 
right now havn't looked in a while.

HTH


-- 
END
------------------------------------------------------------------------------ 

Philip M. Gollucci
Consultant
E-Mail: pgollucci@p6m7g8.com
URL   : http://p6m7g8.net/Resume/resume.shtml
Phone : 301.254.5198

$Id: .signature,v 1.7 2004/09/05 23:46:37 philip Exp $


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