diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-11-26 12:42:55 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-11-26 14:33:47 -0800 |
commit | c98cdb04502ba0aae0ece3aede682de0a5ebad86 (patch) | |
tree | e613f31781b2f12ec513f181ffffbc33c549bba0 /t | |
parent | 97409e817d4758697aa4e2a92d287cb9a1d26b6a (diff) | |
download | perl-c98cdb04502ba0aae0ece3aede682de0a5ebad86.tar.gz |
[perl #97632] Improve SvTAINT docs
Copied almost verbatim from text supplied by Kevin Ryde.
Diffstat (limited to 't')
-rw-r--r-- | t/op/substr.t | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/t/op/substr.t b/t/op/substr.t index 2673fc7782..1dd9ba4a58 100644 --- a/t/op/substr.t +++ b/t/op/substr.t @@ -23,7 +23,7 @@ $SIG{__WARN__} = sub { BEGIN { require './test.pl'; } -plan(360); +plan(361); run_tests() unless caller; @@ -42,6 +42,8 @@ eval{substr($a,999,999) = "" ; };# P R Q S 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' ); |