So, let's reverse this.
I have a module that will be used in perl.
I want all subs in the module to share the stagte of one variable...in my
case @context.
I also want any changes to @context to only effect the current user/request
under mod_perl.
What's the best approach?
1. declare
Sam Tregar wrote:
Cool, thanks. One question (which you may perfectly reasonably ask me
to check for myself): won't this cause a warning when
MOD_PERL_API_VERSION is undefined?
$MP2 = $ENV{MOD_PERL_API_VERSION} == 2 ? 1 : 0;
Perhaps this would be better:
$MP2 = (($ENV{MOD_PERL_API_VERSI
On Sun, 21 Aug 2005, Philip M. Gollucci wrote:
> I wasn't doing it for speed, more of consitency's sake with
> perl.apache.org docs and other modules like Apache::DBI, Apache::DB
> (+friends), and etc. I have however changed it to a user var ($MP2)
> per you request.
Cool, thanks. One question
Hi,
On Sun, Aug 21, 2005 at 01:59:34PM -0400, Sam Tregar wrote:
Very cool! One comment: don't bother with 'use constant' here. The
tiny amount of time saved by using a constant will be overwhelmed by
the time used loading constant.pm and calling import().
I wasn't doing it for speed, more of
On Sun, Aug 21, 2005 at 01:59:34PM -0400, Sam Tregar wrote:
> On Sun, 21 Aug 2005, Philip M. Gollucci wrote:
>
> > Hi all,
> >
> > Nuff said!
>
> Very cool! One comment: don't bother with 'use constant' here. The
> tiny amount of time saved by using a constant will be overwhelmed by
> the time
On Sun, 21 Aug 2005, Philip M. Gollucci wrote:
> Hi all,
>
> Nuff said!
Very cool! One comment: don't bother with 'use constant' here. The
tiny amount of time saved by using a constant will be overwhelmed by
the time used loading constant.pm and calling import().
> P.S.
> I believe its a si
Hi all,
Nuff said!
P.S.
I believe its a side effect, but you need to enable
PerlOptions +GlobalRequest or you get errors in the on_destory() method.
--- Apache.pm Tue Dec 14 10:31:39 2004
+++ Apache.pm.new Sun Aug 21 08:18:22 2005
@@ -108,8 +108,10 @@
use vars qw($VERSION @ISA);