On Mon, 12 Mar 2001, Daniel wrote:
> Just trying to get a consensus on people's usage of the apache request
> object in Registry(NG)* scripts.
>
> I usually make the $r available as a global variable so I can use in
> various subroutines without passing it around constantly. All scripts on
> site start with:
>
> use vars qw(%input $r);
> $r = Apache->request;
>
> This has worked fine...no complaints in log files...until I switched the
> handler from Registry to RegistryNG;
>
> Now I see occasional:
> Variable "$r" will not stay shared at /home/httpd/perl/daily-news.pl
> line 9 (#1)
> in log files.
http://perl.apache.org/guide/troubleshooting.html#Value_of_x_will_not_stay_shared
> first nine from daily-news.pl:
> #!/usr/bin/perl -w
> use strict;
> use DBI;
> use date_site;
> my $dateformat = date_site::dateformat;
> use Apache::Request;
>
> use vars qw($dbh %input %output %filebase $r %sites); #vars used on $r
> $r = Apache->request; #<--here
>
>
> Any ideas on why this would happen?
>
> Thanks in advance,
>
> --
> Daniel Bohling
> NewsFactor Network
>
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/