BEGIN{
# Don't do anything if POSIX is missing, or sigaction missing.
use Config;
- eval { use POSIX; };
+ eval 'use POSIX';
if($@ || $^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'dos' ||
$^O eq 'MacOS' || ($^O eq 'VMS' && !$Config{'d_sigaction'})) {
print "1..0\n";
print "1..0 # Skip: no fork\n";
exit 0;
}
- eval { use POSIX qw(sys_wait_h) };
+ eval 'use POSIX qw(sys_wait_h)';
if ($@) {
print "1..0 # Skip: no POSIX sys_wait_h\n";
exit 0;
}
- eval { use Time::HiRes qw(time) };
+ eval 'use Time::HiRes qw(time)';
if ($@) {
print "1..0 # Skip: no Time::HiRes\n";
exit 0;
# This is actually testing parsing of indirect objects and undefined subs
# print foo("bar") where foo does not exist is not an indirect object.
# print foo "bar" where foo does not exist is an indirect object.
-eval { sub AUTOLOAD { "ok ", shift, "\n"; } };
+eval 'sub AUTOLOAD { "ok ", shift, "\n"; }';
ok(1);
# Bug ID 20010902.002
print "# '$nnewvar'.\nnot " unless $nnewvar eq '8';
print "ok 46\n";
-# This must happen at run time
-eval {
- sub AUTOLOAD : lvalue { $newvar };
-};
+eval 'sub AUTOLOAD : lvalue { $newvar }';
foobar() = 12;
print "# '$newvar'.\nnot " unless $newvar eq "12";
print "ok 47\n";
require "test.pl";
plan( tests => 50 );
-eval { use v5.5.640; };
+eval 'use v5.5.640';
is( $@, '', "use v5.5.640; $@");
require_ok('v5.5.640');
#
# now do the same without the "v"
-eval { use 5.5.640; };
+eval 'use 5.5.640';
is( $@, '', "use 5.5.640; $@");
require_ok('5.5.640');
EXPECT
25
########
-eval {sub bar {print "In bar";}}
+eval 'sub bar {print "In bar"}';
########
system './perl -ne "print if eof" /dev/null' unless $^O eq 'MacOS'
########