Generally I make it a habit to pass the data explicitly:
package A::B::C;
my %CFG = ( some_tag => some_config, ... }
...
do_something( \%CFG );
sub do_something {
...
my $CFG = shift;
do_something_else( $CFG->{some_tag} );
...
}
...
1;
Boysenberry
boysenberrys.com | habitatlife.com | selfgnosis.com
On Aug 20, 2005, at 12:44 PM, Frank Maas wrote:
Guys,
I am getting a bit nervous and since it is Saturday and I am -1 day
before
a deadline, this is not good. So, although this thread (and my
question) is
drifting towards basic Perl, I try my luck.
I make use of the following construction
package A::B::C;
my %CFG = ( some_tag => some_config, ... }
...
sub do_something {
...
do_something_else( $CFG{some_tag} );
...
}
...
1;
After reading much of this discussion I am beginning to wonder if I am
creating closures? (I must admit that the concept of closures is -for
some reason- very hard for me to grasp). If this is creating closures,
then what would be a better approach?
Regards,
Frank