cleaning up tests of the 'eval { decl. } <=> runtime decl.' assumption
authorAdrian M. Enache <enache@rdslink.ro>
Wed, 5 Mar 2003 12:06:20 +0000 (14:06 +0200)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 6 Mar 2003 20:45:08 +0000 (20:45 +0000)
Message-ID: <20030305100620.GA909@ratsnest.hole>

p4raw-id: //depot/perl@18840

ext/POSIX/t/sigaction.t
ext/POSIX/t/waitpid.t
t/op/method.t
t/op/sub_lval.t
t/op/ver.t
t/run/fresh_perl.t

index d280d68..63ff17d 100644 (file)
@@ -8,7 +8,7 @@ BEGIN {
 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";
index e163371..c36a611 100644 (file)
@@ -9,12 +9,12 @@ BEGIN {
        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;
index 52fb705..ae8031a 100755 (executable)
@@ -231,7 +231,7 @@ is( Foo->boogie(), "yes, sir!");
 # 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
index a17c3c6..003c1a0 100755 (executable)
@@ -423,10 +423,7 @@ $a->() = 8;
 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";
index 5cf97a8..acf6af7 100755 (executable)
@@ -13,7 +13,7 @@ use Config;
 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');
@@ -52,7 +52,7 @@ is(v1.20.300.4000, "\x{1}\x{14}\x{12c}\x{fa0}",'compare embedded \x{} string');
 
 #
 # 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');
index 2f8baa6..a0f707f 100644 (file)
@@ -89,7 +89,7 @@ $x=2;$y=3;$x<$y ? $x : $y += 23;print $x;
 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'
 ########