summaryrefslogtreecommitdiff
path: root/dist/Safe
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgs@consttype.org>2013-02-21 08:35:38 +0100
committerRafael Garcia-Suarez <rgs@consttype.org>2013-02-21 14:06:26 +0100
commitac4ec33ee07ea2ee74672667bd81582062239279 (patch)
tree29640973ba44cbeb81100759ba035760e5ef8d44 /dist/Safe
parent00a1356009c12c2c662b1482d1cb8f3dd2f50bf2 (diff)
downloadperl-ac4ec33ee07ea2ee74672667bd81582062239279.tar.gz
Upgrade to Safe 2.35 from CPAN
Diffstat (limited to 'dist/Safe')
-rw-r--r--dist/Safe/Changes8
-rw-r--r--dist/Safe/META.yml2
-rw-r--r--dist/Safe/Safe.pm9
3 files changed, 16 insertions, 3 deletions
diff --git a/dist/Safe/Changes b/dist/Safe/Changes
index 7acc3d53c1..8cde1db330 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 3e6eb55d2a..bcffb01063 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 46e1e50feb..f00853e386 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();