From: Rafael Garcia-Suarez Date: Sun, 24 Aug 2008 14:13:52 +0000 (+0000) Subject: Patch by Tod Hagan to document the 2nd argument of reval() in Safe.pm X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fd8ebd06d0bf43876c887191f4ff165ae9772eb3;p=p5sagit%2Fp5-mst-13.2.git Patch by Tod Hagan to document the 2nd argument of reval() in Safe.pm p4raw-id: //depot/perl@34222 --- diff --git a/ext/Opcode/Safe.pm b/ext/Opcode/Safe.pm index f611e0f..812d571 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: 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