Randy Kobes wrote:
On Thu, 15 Jul 2004, Stas Bekman wrote:


Geoffrey Young wrote:

Stas Bekman wrote:


So I suppose we should go with:

our $VERSION = do { require Apache2; require mod_perl;
$mod_perl::VERSION };


sure.  I just wanted to make sure I understood what was
going on, just to keep me somewhat involved ;)

:)

But actually I'm taking that proposal back. There is no
added value in it. requiring mod_perl => VERSION is
perfectly fine for mp2. It's the requirement of mp1 that
consitutes a problem. And given the fact how often mp1 is
being released and upgraded to, this whole issue is moot.
One is ought to go and pester those in charge of
CPAN/PAUSE to support a better versioning scheme there.


Independent of the latter, I think there's still
a reason to use Apache2, rather than mod_perl,
in a Makefile.PL PREREQ_PM. If someone installs
mp2 with MP_INST_APACHE2=1, then
    perl -Mmod_perl
will fail (as mod_perl.pm will be under Apache2/), whereas
    perl -MApache2
will be OK. Since at the moment CPAN.pm (and I also
believe, CPANPLUS) don't use Apache2.pm to adjust @INC,
they won't see a mp2 install with a PREREQ_PM of mod_perl.

Right. All users of mp2 will either need to set PERL5LIB or start those apps as:


perl -MApache2 ...

because it's not only mod_perl, but also most other CPAN Apache:: modules that will get installed into Apache2/. Same goes for perldoc and other tools. e.g. we now provide mp2doc which is a wrapper around perldoc, but it first loads Apache2.

Quite on the opposite it's good to enforce that loading of Apache2. So if I write the prerequisites for some module as:

  mod_perl           => 2.01,
  Apache::Scoreboard => 2.00,

and a user has adjusted their @INC, then both will be found (assuming they are installed). If we say:

  Apache2            => 2.01,
  Apache::Scoreboard => 2.00,

and no @INC adjustment is done, then Apache2 will be found, but not Apache::Scoreboard.

Moreover it's going to be very confusing since the proposed $Apache::VERSION does load Apache2, so depending on the hashing sometimes Apache2.pm will get loaded before other mp2 3rd party modules, and those will be found, at other times it will be loaded after and they won't be found. So that behavior will be totally random.

The only always-working-solution that I can see is this: module writers that require mod_perl 2, will explicitly load Apache2.pm from Makefile.PL, before they specify the requirements.

--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to