in reply to Generic Composite Interface
What you could do is scan a particular directory for .pm files in a BEGIN block like so:
This works (assuming that the corresponding modules exist and are free of compilation errors) , but without precautions it will really be more error prone than just using the modules explicitly. Neat stuff though .... Perl rules! :)use strict; use Data::Dumper; BEGIN { # scan the current directory eval{require $_} for <*.pm>; }; my @class = ( Foo->new, Bar->new, Baz->new, ); print Dumper $_ for @class;
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (jeffa) Re: Generic Composite Interface
by chhe (Sexton) on Mar 23, 2002 at 19:40 UTC | |
by jeffa (Bishop) on Mar 23, 2002 at 19:52 UTC |