Author Login
Post 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