summaryrefslogtreecommitdiff
path: root/ext/Opcode
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-08-24 14:13:52 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-08-24 14:13:52 +0000
commitfd8ebd06d0bf43876c887191f4ff165ae9772eb3 (patch)
tree5198ab7e1ba5156b5a8faf8fe142c80d1d3bd968 /ext/Opcode
parent8c44bff1ac2926fc059ca84c916a04461ff5ad01 (diff)
downloadperl-fd8ebd06d0bf43876c887191f4ff165ae9772eb3.tar.gz
Patch by Tod Hagan to document the 2nd argument of reval() in Safe.pm
p4raw-id: //depot/perl@34222
Diffstat (limited to 'ext/Opcode')
-rw-r--r--ext/Opcode/Safe.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/Opcode/Safe.pm b/ext/Opcode/Safe.pm
index f611e0f67d..812d5715a9 100644
--- a/ext/Opcode/Safe.pm
+++ b/ext/Opcode/Safe.pm
@@ -3,7 +3,7 @@ package Safe;
use 5.003_11;
use strict;
-$Safe::VERSION = "2.16";
+$Safe::VERSION = "2.16_01";
# *** Don't declare any lexicals above this point ***
#
@@ -486,7 +486,7 @@ variable without any leading type marker. For example,
${$cpt->varglob('foo')} = "Hello world";
-=item reval (STRING)
+=item reval (STRING, STRICT)
This evaluates STRING as perl code inside the compartment.
@@ -513,6 +513,10 @@ This behaviour differs from the beta distribution of the Safe extension
where earlier versions of perl made it hard to mimic the return
behaviour of the eval() command and the context was always scalar.
+The formerly undocumented STRICT argument sets strictness: if true
+'use strict;' is used, otherwise it uses 'no strict;'. B<Note>: if
+STRICT is omitted 'no strict;' is the default.
+
Some points to note:
If the entereval op is permitted then the code can use eval "..." to