Also der folgende Code erzeugt bei mir eine perltypische Fehlermeldung.
eval "use Foo::Bar" or warn "Foo::Bar geht nich";
print "Content-type: text/html\n\n";
print "$@";
exit;
Fehlermeldung:
Can't locate Foo/Bar.pm in @INC (@INC
contains: /usr/local/lib/perl/5.6.1 /usr/local/share/perl/5.6.1 /
usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.6.1 /usr/share/perl/
5.6.1 /usr/local/lib/site_perl) at (eval 1) line 2. BEGIN failed--
compilation aborted at (eval 1) line 2.
Das ist aber irgendwie wenig hilfreich. Könnte man nicht so etwas wie einen negativen Rückgabewert liefern? Also sowas wie:
eval "use Foo::Bar" or $Modul_FooBar = 0;
\n\n
<!--EDIT|cbxk1xg|1103577677-->