in reply to global variables defined in an external file

Whenever I see 'global variables' I immediately think "Configuration File".

There are many, many modules on CPAN in the Config name-space. My particular favorites are Config::Simple and Config::Tiny.

Isolating your global variables into one place and explicitly calling that place 'configuration' is a Goodness for the maintainer.

----
I Go Back to Sleep, Now.

OGB

  • Comment on Re: global variables defined in an external file

Replies are listed 'Best First'.
Re^2: global variables defined in an external file
by fionbarr (Friar) on May 06, 2013 at 16:07 UTC
    got it! thanks
    package x; use warnings; use strict; use Exporter 'import'; our @EXPORT = qw/$a_template $sc/; our $a_template = "a12 a10 a5"; our $sc = 'All'; our @ar = qw/the variables/; our %ha = (exported => ' succesfully.'); 1;
    many thanks