Java Mailing List Archive

http://www.apache-httpd.com/

Home » modperl.perl »

Re: mod_perl / CGI.pm and 'our' variables

Perrin Harkins

2009-08-05


Author LoginPost Reply
2009/8/5 Tomáš Bažant <tbazant@(protected)>:
> yest that works for me if all the packages are in the same file, but if
> i put the Bar package into a separate file and import it with 'use'
> directive, $::dbh always returns undef. or could it be that i am using a
> closure? i'll try to avoid closures...

It's not a closure. You just need to understand Perl's variable
naming and package rules a little better. If there's something
specific you want to show us, we could probably spot the scoping
problem.

- Perrin
©2008 apache-httpd.com - Jax Systems, LLC, U.S.A.