stas 2004/10/18 19:48:40
Modified: t/lib/TestCommon Utils.pm Log: perl 5.6.0 still wants at least one char to trigger taint protections Revision Changes Path 1.5 +5 -3 modperl-2.0/t/lib/TestCommon/Utils.pm Index: Utils.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/lib/TestCommon/Utils.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -u -r1.4 -r1.5 --- Utils.pm 18 Oct 2004 23:21:07 -0000 1.4 +++ Utils.pm 19 Oct 2004 02:48:39 -0000 1.5 @@ -5,11 +5,13 @@ BEGIN { # perl 5.8.0 (only) croaks on eval {} block at compile time when - # it thinks the application is setgid. workaround: that's why we - # need to shutdown compile time errors for this function + # it thinks the application is setgid. workaround: shutdown + # compile time errors for this function local $SIG{__DIE__} = sub { }; + # perl 5.6.x only triggers taint protection on strings which are + # at least one char long sub is_tainted { - return ! eval { eval join '', map { substr $_, 0, 0 } @_; 1}; + return ! eval { eval join '', '#', map substr($_, 0, 0), @_; 1}; } }