Copied almost verbatim from text supplied by Kevin Ryde.
untainting variables.
=for apidoc Am|void|SvTAINT|SV* sv
-Taints an SV if tainting is enabled.
+Taints an SV if tainting is enabled, and if some input to the current
+expression is tainted--usually a variable, but possibly also implicit
+inputs such as locale settings. C<SvTAINT> propagates that taintedness to
+the outputs of an expression in a pessimistic fashion; i.e., without paying
+attention to precisely which outputs are influenced by which inputs.
=cut
*/
BEGIN { require './test.pl'; }
-plan(360);
+plan(361);
run_tests() unless caller;
like ($@, $FATAL_MSG);
is(substr($a,0,-6), 'abc'); # P=Q R S
is(substr($a,-3,1), 'x'); # P Q R S
+sub{$b = shift}->(substr($a,999,999));
+is ($w--, 1, 'boundless lvalue substr only warns on fetch');
substr($a,3,3) = 'XYZ';
is($a, 'abcXYZxyz' );