You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Perrin Harkins <ph...@gmail.com> on 2009/08/05 16:45:34 UTC
Re: mod_perl / CGI.pm and 'our' variables
2009/8/5 Tomáš Bažant <tb...@suse.cz>:
> 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