Using
Exporter isn't really a huge hassle, since you can virtually auto-import if you declare them using something other than a whole whack of variables.
Something to consider is using a global hash instead of a thousand global variables. Then you can have virtually unlimited access to "globals" without having to explicitly declare them.
Further to that, if you really have thousands of "constants", these should probably come from a config file anyway, unless, of course, these are strictly related to the internals of the program.
The more ambitious approach is to write your own
import function and stuff references to your globals into the calling module. Consider:
package Foo;
our $a = "a";
our $b = "b";
sub import
{
my ($self) = @_;
my ($caller_package) = caller;
foreach (keys %{"${self}::"})
{
*{"${caller_package}::$_"} = *$_;
}
}
Now this will export
everything that is exportable,
that being those things declared with
our instead of
my.