I'm not even getting into any subroutines in the modules that the other 2 anchors invoke after the first anchor is executed. Coming into the modules, the 'str' values are wrong. The modules that the anchors execute are 3 different physical modules in contrast to logical subroutines in the same physical module. Maybe I'm just not really understanding what you all are say to me.
CraigT David Scott-2 wrote: > > Have a look at this: > > http://www.perl.com/pub/a/2002/05/07/mod_perl.html > > Perrin is probably right that it's a closure issue. Take a good look at > your code. > > Incidentally, I've found it useful to do a Google search on > incomprehensible error messages ..:) > > d > > CraigT wrote: >> Perrin, >> >> I'm not sure I'm communicating very well. And I'm not sure I understand >> what >> you said. Let me outline what I'm experiencing again. I have a page >> with >> multiple anchors. I saw this problem immediately with 3 of these >> anchors >> when I invoked the page under perl-run (PerlRun). The 3 anchors follow. >> I've left the off on purpose so the anchor will show. >> >> CLASS='zzz tn' HREF='dashboard.cgi?str=$govlevel:3' >> ONMOUSEOVER=\"window.status='$glines[2] Key Indicators';return true\" >> ONMOUSEOUT=\"window.status=' ';return true\">Dashboard</ >> >> values passed = $govlevel:3 = SKY:3 >> >> CLASS='l2' HREF='ss.cgi?str=$govlevel' >> ONMOUSEOVER=\"window.status='Sights >> And Sounds Of $glines[0]';return true\" ONMOUSEOUT=\"window.status=' >> ';return true\">Sights/Sounds</ >> >> values passed = $govlevel = SKY >> >> CLASS='l2' HREF='vumenu.cgi?str=$govlevel~$vufiles' >> ONMOUSEOVER=\"window.status='Special Interest, Measure Views';return >> true\" >> ONMOUSEOUT=\"window.status=' ';return true\">Special Views</ >> >> values passed = $govlevel~$vufiles = SKY~C:/Steep/USA >> Data/State/KY/birth.view!C:/Steep/USA >> Data/State/KY/children.view!C:/Steep/USA >> Data/State/KY/children2.view!C:/Steep/USA >> Data/State/KY/children3.view!C:/Steep/USA >> Data/State/KY/children4.view!C:/Steep/USA >> Data/State/KY/healthybirths.view!C:/Steep/USA >> Data/State/KY/healthybirths2.view!C:/Steep/USA >> Data/State/KY/infantdeaths.view!C:/Steep/USA >> Data/State/KY/infantdeathsin3counties.view!C:/Steep/USA >> Data/State/KY/infantsmothers.view >> >> In each of the modules, I bring 'str' across with something like my >> $somevar >> = $page->param("str") assigning the paramter values to a declared Perl >> variable. And I do use strict everywhere. I then work with those >> paramters in the module invoked by the anchor. But the issue isn't >> about >> working with what gets passed into the module invoked by the anchor. I >> don't get that far. The problem is that what is coming across from the >> invoking module to the invoked module is incorrect. >> >> Notice that the paramters being passed to each of the 3 different >> physical >> modules are passed after being assigned to the variable 'str'. If I >> execute >> any of the 3 anchors first, setting and passing 'str', and then invoke >> any >> of the other 2 anchors, the value of 'str' set in the first invocation >> persists such that the invocation of the other 2 anchors has the 'str' >> values from the first invocation. The value of 'str' will not change >> after >> that first anchor execution until I recycle the server. The first >> anchor I >> executed keeps working and the other 2 keep getting passed the 'str' >> values >> from the first anchor execution and don't work. >> >> Also, I changed the name of 'str' to something unique in each of the 3 >> anchors and anchor modules. When I do this, regardless of which one I >> execute first, the first one works and then the other 2 pass nothing. >> And >> again, it works fine under CGI. >> >> This code has worked correctly under CGI ever since it was written. >> I've >> verified that under the perl-run execution the Perl variables assigned to >> 'str' in all 3 anchors have the correct values before I execute the >> anchors. >> And I've verified the values in 'str' that come across when I invoke the >> anchors right after the $somevar = $page->param("str") line in each of >> the >> physical modules. Regardless of which of these anchors I invoke first, >> invoking either of the remaining 2 anchors results in the values of 'str' >> set in the 1st anchor executed being passed to the modules that the >> remaining 2 anchors execute. >> >> Also, the ENV variables I had in my scratchpad where mistakenly executed >> under CGI. When I printed the ENV stuff executed under perl-run >> (PerlRun), >> MOD_PERL is there. You can see the perl-run ENV stuff by invoking the >> following URL. >> >> http://steepusa.no-ip.info/perl-run/stuff/prtenv.cgi >> >> I would like to understand better the 'no longer shared' message in the >> error log. >> >> I hope this is clearer. I am sort of at a loss here. I live in a small >> rural town in the foothills of the Appalachian Mountains and I have found >> no >> community here to bounce these kinds of things off of. >> I've dealt with a lot of bugs over the years in a variety of languages >> and >> this one seems strange. Can you make any suggestions on how I might >> proceed >> here. The Apache 'ab' modules tells me I can improve the # of request >> per >> second that my server can server by a facor of 3 and I would like to do >> it >> if I can. >> >> CraigT >> >> >> >> >> >> Perrin Harkins wrote: >> >>> [Please keep it on the list] >>> >>> On 7/3/07, Craig Tussey <[EMAIL PROTECTED]> wrote: >>> >>>> Thanks again for responding. Here is the link to my >>>> scratchpad. Keep in mind that I was making entries >>>> to the scratchpad in response to Clintons questions. >>>> >>>> http://www.perlmonks.org/?viewmode=public;node_id=624649 >>>> >>> Okay, you really aren't showing much code here. From what you did >>> show, I'm guessing you're doing this: >>> >>> my $govlevel = $page->param("str"); >>> print_html(); >>> >>> sub print_html { >>> print "blah blah $govlevel blah blah"; >>> } >>> >>> That doesn't work because the sub becomes a closure and never notices >>> when you create new versions of $govlevel. The fix is to pass >>> $govlevel to the sub as a parameter. >>> >>> - Perrin >>> >>> >>> >> >> > > > -- View this message in context: http://www.nabble.com/passing-CGI-paramters-tf4008753.html#a11433964 Sent from the mod_perl - General mailing list archive at Nabble.com.