in reply to Re: Check if DBI is installed (eval to check module is installed)
in thread Check if DBI is installed
C:\>type test.pl use warnings ; use strict; use autouse foo; # perldoc autouse eval {foo::not_here();}; # perldoc -f eval my $we_care=0; warn $@ if ($@ && $we_care); C:\>perl test.pl Bareword "foo" not allowed while "strict subs" in use at test.pl line +5. Execution of test.pl aborted due to compilation errors. C:\>type test.pl use warnings ; use strict; use autouse 'foo'; # perldoc autouse eval {foo::not_here();}; # perldoc -f eval my $we_care=0; warn $@ if ($@ && $we_care); C:\>perl test.pl C:\> C:\>type test.pl use warnings ; use strict; use autouse 'foo'; # perldoc autouse eval {foo::not_here();}; # perldoc -f eval warn $@ if $@; C:\>perl test.pl Undefined subroutine &foo::not_here called at test.pl line 6. C:\>
I presume you mean something like the last example? cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|