in reply to Require Centralized Variables

When I have a set of config values to be shared by many programs, I put them in a module and 'use' it. I manually export the variables into the main package as described by Dominus here.

YuckFoo

==== MyConfig.pm ==== package MyConfig; my $CONFIG = { color => 'blue', animal => 'camel' }; *{"::CONFIG"} = \$CONFIG; 1; ==== testit.pl ==== #!/usr/bin/perl use strict; use MyConfig; print "$CONFIG->{color} $CONFIG->{animal}\n";