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.

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

Reply via email to