in reply to Perl too smart require()ing libs
Use do, not use/require, to load unpackaged libs.
#BarWrapper.pm package BarWrapper; use vars qw/@ISA @EXPORT_OK @SUBS/; require Exporter; @ISA = qw(Exporter); @EXPORT_OK = qw(i_am_another_sub); do "bar.pl"; do "foo.pl"; 1;
#FooWrapper.pm package FooWrapper; use vars qw/@ISA @EXPORT_OK @SUBS/; require Exporter; @ISA = qw(Exporter); @EXPORT_OK = qw(can_i_see_you dont_import_me ); do "foo.pl"; 1;
The wrappers are packaged, so you should continue to use use/require to load them.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl too smart require()ing libs
by clscott (Friar) on Jun 22, 2007 at 15:52 UTC |