in reply to My globals are visable; but undef'ed
So now all uses of the email address, in any package (or hunk of code) arepackage Gbl; # simple holds Global data loaded from the config file eventually use strict; require Exporter; BEGIN{ } my @ISA = qw(Exporter); my @EXPORT = qw(); my @EXPORT_OK = qw(); use vars qw( $EmailAddr $VERSION ); $VERSION = sprintf "%d.%03d", q$Revision: 1.0 $ =~ /: (\d+)\.(\d+)/; $EmailAddr = "a\@b.com"; 1; __END__
This also allows me to find all direct uses of this configurable data by `grep 'Gbl::' *`.$From = "$Gbl::EmailAddr"; ....or somewhere else ... if ($Sender =~ /$Gbl::EmailAddr/) { ...
Thanks all for the help.
|
|---|