Description of problem: mod_perl do NOT handle lexical scope correctly. (See the script below.) Version-Release number of selected component (if applicable): 1.99_16-4 Steps to Reproduce: 1. Set up a http server 2. Configure it to execute the following script with mod_perl 3. Load (force) the following script _several times_ with a browser --- script begin --- #! /usr/bin/perl sub test1 { my $test = join "", map {('a' .. 'z')[int(rand(26))]} (1 .. 6); sub _test2 { my $par = shift; if ($par eq $test) { print <<"EOF"; Content-Type: text/plain Variables identical: $test EOF } else { print <<"EOF"; Content-Type: text/plain Variables NOT identical: $par != $test EOF } # if ($par eq $test) { ... } els... } # _test2 _test2($test); } # test1 test1; --- script end --- Actual results: Several times: "Variables identical: dfhkdf" Then most time: "Variables NOT identical: uskeoy != crmcsm" Expected results: Always "Variables identical: dfhkdf" Additional info: As you can see in the test script there is a function defined in the logical scope of a other function (block).
*** This bug has been marked as a duplicate of 239314 ***