I've confirmed rt.perl.org 5900 as fixed. The tests suggested in the ticket do not appear to have been applied. They're attached.
-- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern/ It's Yellowing Laudanum time!
--- t/op/taint.t 2004/12/10 02:56:44 1.1 +++ t/op/taint.t 2004/12/10 03:07:54 @@ -16,7 +16,7 @@ use Config; use File::Spec::Functions; -my $total_tests = 236; +my $total_tests = 238; my $test = 177; sub ok ($;$) { my($ok, $name) = @_; @@ -1081,4 +1081,26 @@ $result = $tainted_false ? $tainted_whatever : $untainted_whatever; test 235, $result eq "The Fabulous Johnny Cash"; test 236, !tainted( $result ); +} + + +{ + # rt.perl.org 5900 $1 remains tainted if... + # 1) The regular expression contains a scalar variable AND + # 2) The regular expression appears in an elsif clause + + my $foo = "abcdefghi" . $TAINT; + + my $valid_chars = 'a-z'; + if( $foo eq '' ) { + } + elsif( $foo =~ /([$valid_chars]+)/o ) { + test 237, not tainted $1; + } + + if( $foo eq '' ) { + } + elsif( my @bar = $foo =~ /([$valid_chars]+)/o ) { + test 238, not any_tainted @bar; + } }