One thing I do (which I feel is just sane design, let alone working with
Exporter and
use strict) is the following:
package Foo;
use Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(access_internal_var);
use strict;
my %Internal_Var_Here;
sub access_internal_var {
# Insert code here to access the hash
}
Now, in Perl5.6, you get the our keyword. That would modify the above as such:
use strict;
package Foo;
use Exporter;
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(access_internal_var);
.
.
.
The reason I say that this is sane design is that this acts as encapsulation of global variables in a very local way.