perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Peters <>
Subject Re: param and mod_perl
Date Fri, 13 Jun 2008 19:35:10 GMT
Brian Gaber wrote:

> When I read the mod_perl docs they suggest that use vars was one
> approach to fix the "Variable X will not stay shared at" error.

This makes me think that maybe your problem is something else... but try below.

> What is the recommended approach?  Pass a reference to $q?

Not a reference, but $q itself (objects are already references, so passing a
reference to a reference doesn't gain anything). It's a good idea in just about
all programming languages to avoid globals and pass things around to subroutines
that need them.

Michael Peters
Plus Three, LP

View raw message