in reply to Re^2: our scope and packages
in thread our scope and packages
In the package that currently can't access it.
Actually the really right way to do it is to move %prod into a configuration module that might look like this:
and then somewhere in main and in your other package insert the line:package My::Configuration; use strict; use Export qw(import); our @EXPORT_OK = qw(%prod); our %prod = ( ... ); 1;
Doing that you won't even need the our declaration because importing it declares it.use My::Configuration qw(%prod);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: our scope and packages
by jfrm (Monk) on Aug 28, 2008 at 23:36 UTC | |
by tilly (Archbishop) on Aug 29, 2008 at 11:33 UTC | |
by wol (Hermit) on Aug 29, 2008 at 12:55 UTC |
In Section
Seekers of Perl Wisdom