in reply to Automatically importing a subroutine for a particular namespace
In the general case of importing modules/variables in lots of modules, I prefer to import everything I want into some package and automatically export them from there:
Note that this package does not have to be a base class of anything. You only have to use it wherever it's needed:package My::Tools; use Something qw(foo bar); use Other qw(blip blob); use Exporter; our @ISA = 'Exporter'; our @EXPORT = qw(foo bar blip blob);
package Foo::Bar::Asdf; use My::Tools;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Automatically importing a subroutine for a particular namespace
by jacques (Priest) on Jul 04, 2008 at 19:24 UTC | |
by Anonymous Monk on Jul 05, 2008 at 01:28 UTC | |
by jacques (Priest) on Jul 05, 2008 at 02:30 UTC | |
by Joost (Canon) on Jul 05, 2008 at 21:53 UTC |