I don't think that the my($r) is going to work out too well here.  I
don't
use apache registry but I don't think you want to freeze the
Apache->request
and CGI::Apache objects to what they are when the program is compiled.
These
usually need to be modified by apache for each request.

check out:
http://perl.apache.org/guide/perl.html#my_Scoped_Variable_in_Nested_S

cliff rayman
genwax.com





"Arthur M. Kang" wrote:

> Trying to tie $q to $r so I can just pass around a single variable to
> subs.  Not working too well...  Getting frustrated...  Getting ready
to
> punch computer...  :)
>
> using Registry:
>
> my($r) = Apache->request;
> my($q) = new CGI::Apache;
> $r->notes('q',$q);
>
> &test($r);
>
> sub test {
>   my($r) = shift;
>   my($q) = $r->notes('q');
>
>   print $q->param('test');
> }
>
> I'm trying to pass my $q in a fashion like the above example, but
can't
> get it to work.  If anyone has any insights or can provide some help,
> I'd really appreciate it.  I've tried sending it as a reference, and
all
> (ie: $r->notes('q',\$q))...Can't get it.
>
> Arthur

Reply via email to