Change 33112 by [EMAIL PROTECTED] on 2008/01/29 19:25:32

        Integrate:
        [ 33093]
        In Safe, load Carp::Heavy only if it exists (to remain
        compatible with older perls)
        
        [ 33096]
        Bump the version of Safe
        
        [ 33102]
        Make this test pass with the Test::More that comes with perl 5.6.2
        
        [ 33105]
        Document why ok() is being used instead of like(), to stop someone
        undoing it.
        
        [in the correct branch. Whoops!]

Affected files ...

... //depot/maint-5.10/perl/ext/Opcode/Safe.pm#2 integrate
... //depot/maint-5.10/perl/ext/Safe/t/safe3.t#2 integrate

Differences ...

==== //depot/maint-5.10/perl/ext/Opcode/Safe.pm#2 (text) ====
Index: perl/ext/Opcode/Safe.pm
--- perl/ext/Opcode/Safe.pm#1~32694~    2007-12-22 01:23:09.000000000 -0800
+++ perl/ext/Opcode/Safe.pm     2008-01-29 11:25:32.000000000 -0800
@@ -3,7 +3,7 @@
 use 5.003_11;
 use strict;
 
-$Safe::VERSION = "2.12";
+$Safe::VERSION = "2.13";
 
 # *** Don't declare any lexicals above this point ***
 #
@@ -26,7 +26,9 @@
 }
 
 use Carp;
-use Carp::Heavy;
+BEGIN { eval q{
+    use Carp::Heavy;
+} }
 
 use Opcode 1.01, qw(
     opset opset_to_ops opmask_add

==== //depot/maint-5.10/perl/ext/Safe/t/safe3.t#2 (text) ====
Index: perl/ext/Safe/t/safe3.t
--- perl/ext/Safe/t/safe3.t#1~32694~    2007-12-22 01:23:09.000000000 -0800
+++ perl/ext/Safe/t/safe3.t     2008-01-29 11:25:32.000000000 -0800
@@ -1,4 +1,4 @@
-#!perl
+#!perl -w
 
 BEGIN {
     if ($ENV{PERL_CORE}) {
@@ -30,7 +30,8 @@
 
 # Check that it didn't work
 $safe->reval( q{$x + $y} );
-like( $@, qr/^'?addition \(\+\)'? trapped by operation mask/,
+# Written this way to keep the Test::More that comes with perl 5.6.2 happy
+ok( $@ =~ /^'?addition \(\+\)'? trapped by operation mask/,
            'opmask still in place with reval' );
 
 my $safe2 = new Safe;
@@ -43,6 +44,7 @@
 close $fh;
 $safe2->rdo('nasty.pl');
 $safe2->reval( q{$x + $y} );
-like( $@, qr/^'?addition \(\+\)'? trapped by operation mask/,
+# Written this way to keep the Test::More that comes with perl 5.6.2 happy
+ok( $@ =~ /^'?addition \(\+\)'? trapped by operation mask/,
            'opmask still in place with rdo' );
 END { unlink 'nasty.pl' }
End of Patch.

Reply via email to