in reply to Thorny design problem
sub do_em { ... my $module = 'Crunch::' . $company; require $module; $module->do_it( $dir ); } }
Update: Actually that should be:
my $module = 'Crunch/' . $company . '.pm';
...per mpeters' note below.
There are also some CPAN modules for doing plugins which will scan a directory and load each module fitting some criteria, so you don't even have to do the require.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Thorny design problem
by mpeters (Chaplain) on Sep 07, 2005 at 21:40 UTC | |
|
Re^2: Thorny design problem
by tlm (Prior) on Sep 07, 2005 at 21:36 UTC | |
by mpeters (Chaplain) on Sep 07, 2005 at 21:42 UTC |