in reply to Referencing required modules?
my $mod_ref; my %modules; while (<CONFIG>) { chomp; my $mod_name =$_; my $mod_ref = My::Base::Class -> new($mod); $modules{$mod_name} = $mod_ref; }
Note: Untested, just off the top of the (only slightly caffeinated as yet) head.
Use the new() method of your base class as a Factory Object to build references to your sub-modules. Each (blessed) reference gets saved in %modules for later use. If you are feeling appropriately paranoid, you wrap this in an eval.
----
I Go Back to Sleep, Now.
OGB
|
|---|