Avoid accessing variables in other packages from within a module like the plague. Pass the variable that you want to use in the subroutine as an argument to the subroutine. Or if you want to get fancy, instantiate an object. Here's the simple way:
AlCommon::ApplicationAbout( %ApplicationDetails ); # ... package AlCommon; sub ApplicationAbout { my %details = @_; foreach my $AboutItem (qw(Name Version Comments)) { print "$AboutItem = $details{$AboutItem}\n"; } }
In reply to Re: Apache::Registry and main package
by edan
in thread Apache::Registry and main package
by allyc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |