in reply to Perl use and require enigma
Definitely a better idea to fix the old code, but ... would something like this DWYW?
#!/usr/bin/perl -w use strict; BEGIN { local %INC = %INC; require PackageA; import PackageA if UNIVERSAL::can('PackageA', 'import'); } BEGIN { local %INC = %INC; require PackageB; import PackageB if UNIVERSAL::can('PackageB', 'import'); }
print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!
|
|---|