In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/ac4ec33ee07ea2ee74672667bd81582062239279?hp=00a1356009c12c2c662b1482d1cb8f3dd2f50bf2>

- Log -----------------------------------------------------------------
commit ac4ec33ee07ea2ee74672667bd81582062239279
Author: Rafael Garcia-Suarez <[email protected]>
Date:   Thu Feb 21 08:35:38 2013 +0100

    Upgrade to Safe 2.35 from CPAN
-----------------------------------------------------------------------

Summary of changes:
 dist/Safe/Changes  |    8 ++++++++
 dist/Safe/META.yml |    2 +-
 dist/Safe/Safe.pm  |    9 +++++++--
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/dist/Safe/Changes b/dist/Safe/Changes
index 7acc3d5..8cde1db 100644
--- a/dist/Safe/Changes
+++ b/dist/Safe/Changes
@@ -1,3 +1,11 @@
+2.35 Thu Feb 21 2013
+    - localize %SIG in the Safe compartment
+    - actually check that we call execution methods on a Safe object
+
+2.34
+    - Test bug #111462, Safe + %^H + disallowed ops (Father Chrysostomos)
+      cf Perl 5 change 42440e3c68e8bafb7e2a74763360939de0fad6be
+
 2.33 Tue Apr  3 2012
     - Don’t eval code under ‘no strict’ (Father Chrysostomos)
       cf. Perl 5 change 25dc25e774abbe993644899cf4d9f9925a9fb9a8
diff --git a/dist/Safe/META.yml b/dist/Safe/META.yml
index 3e6eb55..bcffb01 100644
--- a/dist/Safe/META.yml
+++ b/dist/Safe/META.yml
@@ -18,4 +18,4 @@ no_index:
     - t
     - inc
 requires: {}
-version: 2.33
+version: 2.35
diff --git a/dist/Safe/Safe.pm b/dist/Safe/Safe.pm
index 46e1e50..f00853e 100644
--- a/dist/Safe/Safe.pm
+++ b/dist/Safe/Safe.pm
@@ -3,7 +3,7 @@ package Safe;
 use 5.003_11;
 use Scalar::Util qw(reftype refaddr);
 
-$Safe::VERSION = "2.34";
+$Safe::VERSION = "2.35";
 
 # *** Don't declare any lexicals above this point ***
 #
@@ -21,7 +21,7 @@ sub lexless_anon_sub {
     # Uses a closure (on $__ExPr__) to pass in the code to be executed.
     # (eval on one line to keep line numbers as expected by caller)
     eval sprintf
-    'package %s; %s sub { @_=(); eval q[my $__ExPr__;] . $__ExPr__; }',
+    'package %s; %s sub { @_=(); eval q[local *SIG; my $__ExPr__;] . 
$__ExPr__; }',
                 $_[0], $_[1] ? 'use strict;' : '';
 }
 
@@ -355,6 +355,8 @@ sub _clean_stash {
 
 sub reval {
     my ($obj, $expr, $strict) = @_;
+    die "Bad Safe object" unless $obj->isa('Safe');
+
     my $root = $obj->{Root};
 
     my $evalsub = lexless_anon_sub($root, $strict, $expr);
@@ -405,6 +407,7 @@ sub _find_code_refs {
 
 sub wrap_code_ref {
     my ($obj, $sub) = @_;
+    die "Bad safe object" unless $obj->isa('Safe');
 
     # wrap code ref $sub with _safe_call_sv so that, when called, the
     # execution will happen with the compartment fully 'in effect'.
@@ -440,6 +443,8 @@ sub wrap_code_ref {
 
 sub rdo {
     my ($obj, $file) = @_;
+    die "Bad Safe object" unless $obj->isa('Safe');
+
     my $root = $obj->{Root};
 
     my $sg = sub_generation();

--
Perl5 Master Repository

Reply via email to