You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Khachaturov, Vassilii" <Va...@comverse.com> on 2001/03/12 18:26:23 UTC

incompat. with apache/mod_perl upgrade

When I upgraded from 
Solaris Apache/1.3.14 (Unix) mod_perl/1.24_01
to
Solaris Apache/1.3.17 (Unix) mod_perl/1.25

the following code in my debugging httpd.conf broke:

<Perl>
sub WWW_DIR () { $ENV{'HOME'} . '/www' ; } # this sub will persist to next
<Perl>
... more code, using WWW_DIR sometimes
</Perl>

.. more plain apache conf stuff here

<Perl>
$AxCacheDir = WWW_DIR . '/htdocs/x/cache';
</Perl>

While this worked before, it now generates an undef sub called at the second
<Perl> 
section. Redefining it there again works, but emits strange prototype
mismatch stuff
at the 2nd <Perl> calling of the routine.
To restore the old behavior I had to define it again without the brackets
(the args 
prototype) at the 2nd section.

Was this change intentionally done (why?!), or is it a by-product of some 
other code advances?
What is the correct way of passing Perl stuff from one <Perl> section to
another?

Vassilii

Re: incompat. with apache/mod_perl upgrade

Posted by Steve Leibel <st...@bluetuna.com>.
At 12:26 PM -0500 3/12/01, Khachaturov, Vassilii wrote:
>When I upgraded from
>Solaris Apache/1.3.14 (Unix) mod_perl/1.24_01
>to
>Solaris Apache/1.3.17 (Unix) mod_perl/1.25
>
>the following code in my debugging httpd.conf broke:
>
><Perl>
>sub WWW_DIR () { $ENV{'HOME'} . '/www' ; } # this sub will persist to next
><Perl>
>... more code, using WWW_DIR sometimes
></Perl>


When I built Apache 1.3.17 with mod_perl 1.2.5 and numerous other 
mods, the resulting httpd was unable to read its usual configuration 
file.  When I upgraded to Apache 1.3.19 the problem went away.

I'd try 1.3.19.


Re: incompat. with apache/mod_perl upgrade

Posted by Stas Bekman <st...@stason.org>.
On Mon, 12 Mar 2001, Khachaturov, Vassilii wrote:

> When I upgraded from
> Solaris Apache/1.3.14 (Unix) mod_perl/1.24_01
> to
> Solaris Apache/1.3.17 (Unix) mod_perl/1.25
>
> the following code in my debugging httpd.conf broke:
>
> <Perl>
> sub WWW_DIR () { $ENV{'HOME'} . '/www' ; } # this sub will persist to next
> <Perl>
> ... more code, using WWW_DIR sometimes
> </Perl>
>
> .. more plain apache conf stuff here
>
> <Perl>
> $AxCacheDir = WWW_DIR . '/htdocs/x/cache';
> </Perl>
>
> While this worked before, it now generates an undef sub called at the second
> <Perl>
> section. Redefining it there again works, but emits strange prototype
> mismatch stuff
> at the 2nd <Perl> calling of the routine.
> To restore the old behavior I had to define it again without the brackets
> (the args
> prototype) at the 2nd section.
>
> Was this change intentionally done (why?!), or is it a by-product of some
> other code advances?
> What is the correct way of passing Perl stuff from one <Perl> section to
> another?

Please read
http://perl.apache.org/guide/config.html#Apache_Configuration_in_Perl
and you will understand how C<Perl> sections work.

I also don't understand why are you trying to use sub to define a
variable, which is pretty useless, since you use it only during
configuration. Also use the constant pragma.

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:stas@stason.org   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/