For me, your code results in
Can't locate C:/Perl/site/lib/ACME in @INC (@INC contains: C:/Perl/lib
+ C:/Perl/site/lib .) at C:\Dokumente und Einstellungen\foo\Desktop\t.
+pl line 10.
BEGIN failed--compilation aborted at C:\Dokumente und Einstellungen\fo
+o\Desktop\t.pl line 12.
I just tried to use
eval to trap some nasty error messages and I got away with it -- I highly doubt whether this is legal, though:
#!perl
use strict;
use warnings;
BEGIN {
my $dir = "C:/Perl/site/lib/";
my $r;
for (<$dir*.pm>) {
/([^\/]+)$/ && ($r = $1) or next;
eval { rquire $_ } unless ($r and $INC{$r});
}
}
use Data::Dumper;
print Dumper \%INC;
Anyway, I hope this helped the OP.
CombatSquirrel.
Entropy is the tendency of everything going to hell.