Thread: RE: [htmltmpl] mod_perl usage
Brought to you by:
samtregar
From: Paulsen, B. <BPa...@le...> - 2006-03-07 11:25:56
|
Can you have your script output something to the error log when it is run= =3F= I suspect that something is not properly configured on your server and it= = is setting invalid cache control headers on your output. It almost sounds = like the apache server thinks it is serving up a file rather than a script. Also, you should see if you can get a full blown mod_perl server running. = While PHP may still be faster, the difference should be negligible. A real= = mod_perl server is lightning fast. ---- Original Message ---- =46rom: "Matthew Boehm" <dr...@ma...> Date: 3/7/06 12:10 am To: "htm...@li..." = <htm...@li...> Subj: [htmltmpl] mod_perl usage Hey guys, I tried to register to the list but SF never replied back to me; so if anyone replies, I'd appreciate a CC: We use mod_perl in the format of ModPerl::PerlRun. We run only one cgi (our main app) that loads HTML pages via simple file open and uses a crude search/replace as our 'template' system. I've been trying various perl template engines (like HTML::Template and CGI::FastTemplate). Unfortunatly, due to some unknow reason, both template packages are returning cached versions of our HTML. For example, many of our CGI calls follow this pattern: http://www.ourdomain.com/cgi-bin/jefferson.cgi=3FcompanyID=3DXXXX Where XXXX is any one of our several thousand customer numbers. The only differences in the pages produced by the CGI are customer name, address, logo, etc..pulled from database. The problem in my testing has been thus: I access the URL above with ID 4035 and I get the correct info of company #4035. I then access the same URL but change the ID to 2134. Even though the URL shows 2134, the page displays content for 4035. I am forced to hit refresh on my browser several times before seeing 2134's info. I've explicitly turned off the caching feature of HTML::Template, yet I experience the same as above. Since our main app is Perl based, having mod_perl greatly increases our preformance. But it seems that using mod_perl prevents us from using a template system other than our own. (I had the same experience with CGI::FastTemplate) Can anyone shed some light on this=3F I am tempted to just rewrite our CGI into PHP as PHP executes faster than Perl even with mod_perl and I don't get this caching problem. But that will take time. Can anyone shed some light on my situation=3F I am not familiar with mod_perl at all, so if we are indeed running that portion poorly assistance there would be appreciated as well. Thanks, Matthew ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel=3Fcmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 _______________________________________________ Html-template-users mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/html-template-users ---------------------------------------------------------------------------= --- This message is intended only for the personal and confidential use of the = designated recipient(s) named above. If you are not the intended recipient= = of this message you are hereby notified that any review, dissemination, = distribution or copying of this message is strictly prohibited. This = communication is for information purposes only and should not be regarded a= s= an offer to sell or as a solicitation of an offer to buy any financial = product, an official confirmation of any transaction, or as an official = statement of Lehman Brothers. Email transmission cannot be guaranteed to b= e= secure or error-free. Therefore, we do not represent that this informatio= n= is complete or accurate and it should not be relied upon as such. All = information is subject to change without notice. |
From: Paulsen, B. <BPa...@le...> - 2006-03-07 14:09:31
|
I use Apache::Registry (this has likely been replaced by the ModPerl::Registry that you mention) The scripts do get compiled and stored in memory and it's exactly what you want. It sounds to me that you are writing the output to a file and then redirecting to that file. I do not have the "+ParseHeaders" option set, and that might be the difference. Perhaps the ParseHeaders is setting invalid caching tags. =20 The best thing to do in this example is use a text client (such as lwp-request) to run the script and have it output the entire string (headers and all). It should hopefully be very apparent where the problem is. The main difference between ModPerl::PerlRun and ModPerl::Registry is that ModPerl::PerlRun still exits after every call to the script. In other words, the only thing you are saving is the module compilation time (this can still be significant). If you are not including those modules in an apache startup script, you are not even saving that. You definitly have enough of the .so modules installed. I consider "full-blown" to mean that you are using ModPerl::Registry. If you can track down and fix that caching issues, you should notice a huge improvement in speed. Brian=20 -----Original Message----- =46rom: htm...@li... [mailto:htm...@li...] On Behalf Of Matthew Boehm Sent: Tuesday, March 07, 2006 9:00 AM To: htm...@li... Subject: RE: [htmltmpl] mod_perl usage > I have no experience of ModPerl::PerlRun. How then are you running ModPerl=3F My apache conf contains this which activates mod_perl for a specific directory on our web server: <Directory /home/me/public_html/pages/sc2/> Options +ExecCGI <FilesMatch "\.cgi$"> SetHandler perl-script PerlResponseHandler ModPerl::PerlRun PerlOptions +ParseHeaders </FilesMatch> </Directory> > Make sure it is not you browser that is caching the page as a first off. I've disabled cache on the browsers and tried different browsers on different OSes. Same 'caching' behavior from the template module. > How does ModPerl::PerlRun work=3F I don't even begin to pretend to know anything about mod_perl, but =66rom the docs "ModPerl::PerlRun - Run unaltered CGI scripts under mod_perl". If you use ModPerl::Registry, the docs say quite outright that your script gets compiled and stored in memory. We discovered this during our first attempts at modperl. Using Registry, our main CGI results would get cached using our own template model. So we switched to PerlRun and the caching stopped. Now I'm trying to use a template and the caching is back even though nothing else has changed in our setup. It was my understanding that mod_perl does nothing for you unless you 'activate' it for a directory/vhost like I did above. > Also, you should see if you can get a full blown mod_perl server running. Here is our server: Server version: Apache/2.0.55 Server built: Oct 23 2005 13:44:20 Compiled in modules: core.c mod_perl.c prefork.c http_core.c mod_so.c Is that full-blown enough=3F Thanks, Matthew ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel=3Fcmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 _______________________________________________ Html-template-users mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/html-template-users ---------------------------------------------------------------------------= --- This message is intended only for the personal and confidential use of the = designated recipient(s) named above. If you are not the intended recipient= = of this message you are hereby notified that any review, dissemination, = distribution or copying of this message is strictly prohibited. This = communication is for information purposes only and should not be regarded a= s= an offer to sell or as a solicitation of an offer to buy any financial = product, an official confirmation of any transaction, or as an official = statement of Lehman Brothers. Email transmission cannot be guaranteed to b= e= secure or error-free. Therefore, we do not represent that this informatio= n= is complete or accurate and it should not be relied upon as such. All = information is subject to change without notice. |
From: Matthew B. <dr...@ma...> - 2006-03-07 14:43:54
|
Here is some debug information. What follows is 3 attempts at my CGI. First was with the companyID of 1 (Traders International) 2nd was ID 26 (Trading Zoo) and 3rd was ID 2 (omNovia). Notice that the #3 attempt shows the same values from attempt #1 and that #3's debug output is MUCH less than the other 2. So who is caching this? Sounds like mod_perl is. This is bad. apologies for line wrapping.. Thanks, Matthew **** attempt #1 **** ### HTML::Template Debug ### In _parse: ### HTML::Template Debug ### /templates/background.tpl : line 1 : TMPL_IF login_menu start ### HTML::Template Debug ### /templates/background.tpl : line 2 : INCLUDE login_menu.tpl ### HTML::Template Debug ### /templates/login_menu.tpl : line 1 : parsed VAR header ### HTML::Template Debug ### /templates/login_menu.tpl : line 13 : parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 17 : parsed VAR companyname ### HTML::Template Debug ### /templates/login_menu.tpl : line 22 : parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 23 : parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 31 : parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 32 : parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 35 : parsed VAR footer ### HTML::Template Debug ### /templates/background.tpl : line 2 : /TMPL_IF end ### HTML::Template Debug ### /templates/background.tpl : line 4 : TMPL_IF login_page start ### HTML::Template Debug ### /templates/background.tpl : line 5 : INCLUDE login_page.tpl ### HTML::Template Debug ### /templates/background.tpl : line 5 : /TMPL_IF end ### HTML::Template _param Stack Dump ### bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o = undef)}, 'HTML::Template::NOOP' ), bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), msg.innerHTML = "Your subscription expires in " + daysTillExpired + " days. " + document.getElementById(\'popupinfo\').innerHTML += " <span style=\\"font-weight: bold; color: #FF0000;\\">Dual Windows disabled due to popup blocker.</span>"; _javarow.innerHTML = _html; r.innerHTML = "<font color=red " + fSize + "><b>" + t + "</b></font>" + addedTxt; c.innerHTML = "<b>Event Name:</b>" + sText; c.innerHTML=""; ### HTML::Template Cache Debug ### CACHE LOAD : /templates/background.tpl => a3b4215ada4a08b236710034cb1dd9c3 ### HTML::Template Debug ### In output ### HTML::Template output Stack Dump ### bless( do{\(my $o = 1)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), bless( do{\(my $o = '<!DOCTYPE HTML PUBLIC \'-//W3C//DTD HTML 4.01 Transitional//EN\' \'http://www.w3.org/TR/html4/loose.dtd\'> <td>')}, 'HTML::Template::VAR' ), bless( do{\(my $o = '1')}, 'HTML::Template::VAR' ), bless( do{\(my $o = 'Traders International')}, 'HTML::Template::VAR' ), </html>')}, 'HTML::Template::VAR' ), bless( do{\(my $o = undef)}, 'HTML::Template::NOOP' ), bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), msg.innerHTML = "Your subscription expires in " + daysTillExpired + " days. " + document.getElementById(\'popupinfo\').innerHTML += " <span style=\\"font-weight: bold; color: #FF0000;\\">Dual Windows disabled due to popup blocker.</span>"; _javarow.innerHTML = _html; r.innerHTML = "<font color=red " + fSize + "><b>" + t + "</b></font>" + addedTxt; c.innerHTML = "<b>Event Name:</b>" + sText; c.innerHTML=""; **** attempt #2 ****** ### HTML::Template Debug ### In _parse: ### HTML::Template Debug ### /templates/background.tpl : line 1 : TMPL_IF login_menu start ### HTML::Template Debug ### /templates/background.tpl : line 2 : INCLUDE login_menu.tpl ### HTML::Template Debug ### /templates/login_menu.tpl : line 1 : parsed VAR header ### HTML::Template Debug ### /templates/login_menu.tpl : line 13 : parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 17 : parsed VAR companyname ### HTML::Template Debug ### /templates/login_menu.tpl : line 22 : parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 23 : parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 31 : parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 32 : parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 35 : parsed VAR footer ### HTML::Template Debug ### /templates/background.tpl : line 2 : /TMPL_IF end ### HTML::Template Debug ### /templates/background.tpl : line 4 : TMPL_IF login_page start ### HTML::Template Debug ### /templates/background.tpl : line 5 : INCLUDE login_page.tpl ### HTML::Template Debug ### /templates/background.tpl : line 5 : /TMPL_IF end ### HTML::Template _param Stack Dump ### bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o = undef)}, 'HTML::Template::NOOP' ), bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), msg.innerHTML = "Your subscription expires in " + daysTillExpired + " days. " + document.getElementById(\'popupinfo\').innerHTML += " <span style=\\"font-weight: bold; color: #FF0000;\\">Dual Windows disabled due to popup blocker.</span>"; _javarow.innerHTML = _html; r.innerHTML = "<font color=red " + fSize + "><b>" + t + "</b></font>" + addedTxt; c.innerHTML = "<b>Event Name:</b>" + sText; c.innerHTML=""; ### HTML::Template Cache Debug ### CACHE LOAD : /templates/background.tpl => a3b4215ada4a08b236710034cb1dd9c3 ### HTML::Template Debug ### In output ### HTML::Template output Stack Dump ### bless( do{\(my $o = 1)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), bless( do{\(my $o = '<!DOCTYPE HTML PUBLIC \'-//W3C//DTD HTML 4.01 Transitional//EN\' \'http://www.w3.org/TR/html4/loose.dtd\'> <td>')}, 'HTML::Template::VAR' ), bless( do{\(my $o = '26')}, 'HTML::Template::VAR' ), bless( do{\(my $o = 'TradingZoo')}, 'HTML::Template::VAR' ), </html>')}, 'HTML::Template::VAR' ), bless( do{\(my $o = undef)}, 'HTML::Template::NOOP' ), bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), msg.innerHTML = "Your subscription expires in " + daysTillExpired + " days. " + document.getElementById(\'popupinfo\').innerHTML += " <span style=\\"font-weight: bold; color: #FF0000;\\">Dual Windows disabled due to popup blocker.</span>"; _javarow.innerHTML = _html; r.innerHTML = "<font color=red " + fSize + "><b>" + t + "</b></font>" + addedTxt; c.innerHTML = "<b>Event Name:</b>" + sText; c.innerHTML=""; ******* attempt #3 ****** ### HTML::Template Cache Debug ### CACHE HIT : /some/path//pages/sctest/templates/background.tpl => a3b4215ada4a08b236710034cb1dd9c3 ### HTML::Template Debug ### In output ### HTML::Template output Stack Dump ### bless( do{\(my $o = 1)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), bless( do{\(my $o = '<!DOCTYPE HTML PUBLIC \'-//W3C//DTD HTML 4.01 Transitional//EN\' \'http://www.w3.org/TR/html4/loose.dtd\'> <td>')}, 'HTML::Template::VAR' ), bless( do{\(my $o = '1')}, 'HTML::Template::VAR' ), bless( do{\(my $o = 'Traders International')}, 'HTML::Template::VAR' ), </html>')}, 'HTML::Template::VAR' ), bless( do{\(my $o = undef)}, 'HTML::Template::NOOP' ), bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), msg.innerHTML = "Your subscription expires in " + daysTillExpired + " days. " + document.getElementById(\'popupinfo\').innerHTML += " <span style=\\"font-weight: bold; color: #FF0000;\\">Dual Windows disabled due to popup blocker.</span>"; _javarow.innerHTML = _html; r.innerHTML = "<font color=red " + fSize + "><b>" + t + "</b></font>" + addedTxt; c.innerHTML = "<b>Event Name:</b>" + sText; c.innerHTML=""; |
From: Matthew B. <dr...@ma...> - 2006-03-07 14:58:17
|
> I use Apache::Registry (this has likely been replaced by the > ModPerl::Registry that you mention) From what I just read, Apache::Registry is the mod_perl version 1 for Apache1 and ModPerl::registry is mod_perl 2 for Apache2 > The scripts do get compiled and stored in memory and it's exactly what > you want. So even if the code is compiled, it will still accept and process different input? Well, duh, that makes sense. > It sounds to me that you are writing the output to a file and > then redirecting to that file. This is my HTML::Template output line: print "Content-Type: text/html\n\n", $template->output(); > The best thing to do in this example is use a text client (such as Will try that. Anything I should be looking for specifically? > If you are not including those > modules in an apache startup script, you are not even saving that. Can you explain this more? My script "use"es several other perl modules. Should I be loading those via Apache? Thanks, Matthew |
From: Paulsen, B. <BPa...@le...> - 2006-03-07 14:53:40
|
I have an idea of where the caching is happening... Put this at the top of your script : use strict;=20 Does your script still work=3F -----Original Message----- =46rom: htm...@li... [mailto:htm...@li...] On Behalf Of Matthew Boehm Sent: Tuesday, March 07, 2006 9:44 AM To: htm...@li... Subject: Re: [htmltmpl] mod_perl usage Here is some debug information. What follows is 3 attempts at my CGI.=20 =46irst was with the companyID of 1 (Traders International) 2nd was ID 26 (Trading Zoo) and 3rd was ID 2 (omNovia). Notice that the #3 attempt shows the same values from attempt #1 and that #3's debug output is MUCH less than the other 2. So who is caching this=3F Sounds like mod_perl is. This is bad. apologies for line wrapping.. Thanks, Matthew **** attempt #1 **** ### HTML::Template Debug ### In _parse: ### HTML::Template Debug ### /templates/background.tpl : line 1 :=20 TMPL_IF login_menu start ### HTML::Template Debug ### /templates/background.tpl : line 2 :=20 INCLUDE login_menu.tpl ### HTML::Template Debug ### /templates/login_menu.tpl : line 1 : parsed VAR header ### HTML::Template Debug ### /templates/login_menu.tpl : line 13 :=20 parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 17 :=20 parsed VAR companyname ### HTML::Template Debug ### /templates/login_menu.tpl : line 22 :=20 parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 23 :=20 parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 31 :=20 parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 32 :=20 parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 35 :=20 parsed VAR footer ### HTML::Template Debug ### /templates/background.tpl : line 2 :=20 /TMPL_IF end ### HTML::Template Debug ### /templates/background.tpl : line 4 :=20 TMPL_IF login_page start ### HTML::Template Debug ### /templates/background.tpl : line 5 :=20 INCLUDE login_page.tpl ### HTML::Template Debug ### /templates/background.tpl : line 5 :=20 /TMPL_IF end ### HTML::Template _param Stack Dump ### bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::NOOP' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), msg.innerHTML =3D "Your subscription expires in " + daysTillExpired + " days. " + document.getElementById(\'popupinfo\').innerHTML +=3D " <span style=3D\\"font-weight: bold; color: #FF0000;\\">Dual Windows disabled due to popup blocker.</span>"; _javarow.innerHTML =3D _html; r.innerHTML =3D "<font color=3Dred " + fSize + "><b>" + t + "</b></font>" + addedTxt; c.innerHTML =3D "<b>Event Name:</b>" + sText; c.innerHTML=3D""; ### HTML::Template Cache Debug ### CACHE LOAD :=20 /templates/background.tpl =3D> a3b4215ada4a08b236710034cb1dd9c3 ### HTML::Template Debug ### In output ### HTML::Template output Stack Dump ### bless( do{\(my $o =3D 1)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), bless( do{\(my $o =3D '<!DOCTYPE HTML PUBLIC \'-//W3C//DTD HTML 4.01 Transitional//EN\' \'http://www.w3.org/TR/html4/loose.dtd\'> <td>')}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D '1')}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D 'Traders International')}, 'HTML::Template::VAR' ), </html>')}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::NOOP' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), msg.innerHTML =3D "Your subscription expires in " + daysTillExpired + " days. " + document.getElementById(\'popupinfo\').innerHTML +=3D " <span style=3D\\"font-weight: bold; color: #FF0000;\\">Dual Windows disabled due to popup blocker.</span>"; _javarow.innerHTML =3D _html; r.innerHTML =3D "<font color=3Dred " + fSize + "><b>" + t + "</b></font>" + addedTxt; c.innerHTML =3D "<b>Event Name:</b>" + sText; c.innerHTML=3D""; **** attempt #2 ****** ### HTML::Template Debug ### In _parse: ### HTML::Template Debug ### /templates/background.tpl : line 1 :=20 TMPL_IF login_menu start ### HTML::Template Debug ### /templates/background.tpl : line 2 :=20 INCLUDE login_menu.tpl ### HTML::Template Debug ### /templates/login_menu.tpl : line 1 : parsed VAR header ### HTML::Template Debug ### /templates/login_menu.tpl : line 13 :=20 parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 17 :=20 parsed VAR companyname ### HTML::Template Debug ### /templates/login_menu.tpl : line 22 :=20 parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 23 :=20 parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 31 :=20 parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 32 :=20 parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 35 :=20 parsed VAR footer ### HTML::Template Debug ### /templates/background.tpl : line 2 :=20 /TMPL_IF end ### HTML::Template Debug ### /templates/background.tpl : line 4 :=20 TMPL_IF login_page start ### HTML::Template Debug ### /templates/background.tpl : line 5 :=20 INCLUDE login_page.tpl ### HTML::Template Debug ### /templates/background.tpl : line 5 :=20 /TMPL_IF end ### HTML::Template _param Stack Dump ### bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::NOOP' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), msg.innerHTML =3D "Your subscription expires in " + daysTillExpired + " days. " + document.getElementById(\'popupinfo\').innerHTML +=3D " <span style=3D\\"font-weight: bold; color: #FF0000;\\">Dual Windows disabled due to popup blocker.</span>"; _javarow.innerHTML =3D _html; r.innerHTML =3D "<font color=3Dred " + fSize + "><b>" + t + "</b></font>" + addedTxt; c.innerHTML =3D "<b>Event Name:</b>" + sText; c.innerHTML=3D""; ### HTML::Template Cache Debug ### CACHE LOAD :=20 /templates/background.tpl =3D> a3b4215ada4a08b236710034cb1dd9c3 ### HTML::Template Debug ### In output ### HTML::Template output Stack Dump ### bless( do{\(my $o =3D 1)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), bless( do{\(my $o =3D '<!DOCTYPE HTML PUBLIC \'-//W3C//DTD HTML 4.01 Transitional//EN\' \'http://www.w3.org/TR/html4/loose.dtd\'> <td>')}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D '26')}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D 'TradingZoo')}, 'HTML::Template::VAR' ), </html>')}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::NOOP' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), msg.innerHTML =3D "Your subscription expires in " + daysTillExpired + " days. " + document.getElementById(\'popupinfo\').innerHTML +=3D " <span style=3D\\"font-weight: bold; color: #FF0000;\\">Dual Windows disabled due to popup blocker.</span>"; _javarow.innerHTML =3D _html; r.innerHTML =3D "<font color=3Dred " + fSize + "><b>" + t + "</b></font>" + addedTxt; c.innerHTML =3D "<b>Event Name:</b>" + sText; c.innerHTML=3D""; ******* attempt #3 ****** ### HTML::Template Cache Debug ### CACHE HIT :=20 /some/path//pages/sctest/templates/background.tpl =3D> a3b4215ada4a08b236710034cb1dd9c3 ### HTML::Template Debug ### In output ### HTML::Template output Stack Dump ### bless( do{\(my $o =3D 1)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), bless( do{\(my $o =3D '<!DOCTYPE HTML PUBLIC \'-//W3C//DTD HTML 4.01 Transitional//EN\' \'http://www.w3.org/TR/html4/loose.dtd\'> <td>')}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D '1')}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D 'Traders International')}, 'HTML::Template::VAR' ), </html>')}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::NOOP' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), msg.innerHTML =3D "Your subscription expires in " + daysTillExpired + " days. " + document.getElementById(\'popupinfo\').innerHTML +=3D " <span style=3D\\"font-weight: bold; color: #FF0000;\\">Dual Windows disabled due to popup blocker.</span>"; _javarow.innerHTML =3D _html; r.innerHTML =3D "<font color=3Dred " + fSize + "><b>" + t + "</b></font>" + addedTxt; c.innerHTML =3D "<b>Event Name:</b>" + sText; c.innerHTML=3D""; ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel=3Fcmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 _______________________________________________ Html-template-users mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/html-template-users ---------------------------------------------------------------------------= --- This message is intended only for the personal and confidential use of the = designated recipient(s) named above. If you are not the intended recipient= = of this message you are hereby notified that any review, dissemination, = distribution or copying of this message is strictly prohibited. This = communication is for information purposes only and should not be regarded a= s= an offer to sell or as a solicitation of an offer to buy any financial = product, an official confirmation of any transaction, or as an official = statement of Lehman Brothers. Email transmission cannot be guaranteed to b= e= secure or error-free. Therefore, we do not represent that this informatio= n= is complete or accurate and it should not be relied upon as such. All = information is subject to change without notice. |
From: Matthew B. <dr...@ma...> - 2006-03-07 14:59:34
|
Already using use strict, and using use warnings. And yes, the script works fine. -Matthew Paulsen, Brian wrote: > I have an idea of where the caching is happening... > > Put this at the top of your script : > use strict; > > Does your script still work? > > -----Original Message----- > From: htm...@li... > [mailto:htm...@li...] On Behalf Of > Matthew Boehm > Sent: Tuesday, March 07, 2006 9:44 AM > To: htm...@li... > Subject: Re: [htmltmpl] mod_perl usage > > Here is some debug information. What follows is 3 attempts at my CGI. > First was with the companyID of 1 (Traders International) 2nd was ID 26 > (Trading Zoo) and 3rd was ID 2 (omNovia). Notice that the #3 attempt > shows the same values from attempt #1 and that #3's debug output is MUCH > less than the other 2. > > So who is caching this? Sounds like mod_perl is. This is bad. > > apologies for line wrapping.. > > Thanks, > Matthew > > **** attempt #1 **** > > ### HTML::Template Debug ### In _parse: > ### HTML::Template Debug ### /templates/background.tpl : line 1 : > TMPL_IF login_menu start > ### HTML::Template Debug ### /templates/background.tpl : line 2 : > INCLUDE login_menu.tpl > ### HTML::Template Debug ### /templates/login_menu.tpl : line 1 : parsed > VAR header ### HTML::Template Debug ### /templates/login_menu.tpl : line > 13 : > parsed VAR companyid > ### HTML::Template Debug ### /templates/login_menu.tpl : line 17 : > parsed VAR companyname > ### HTML::Template Debug ### /templates/login_menu.tpl : line 22 : > parsed VAR companyid > ### HTML::Template Debug ### /templates/login_menu.tpl : line 23 : > parsed VAR companyid > ### HTML::Template Debug ### /templates/login_menu.tpl : line 31 : > parsed VAR companyid > ### HTML::Template Debug ### /templates/login_menu.tpl : line 32 : > parsed VAR companyid > ### HTML::Template Debug ### /templates/login_menu.tpl : line 35 : > parsed VAR footer > ### HTML::Template Debug ### /templates/background.tpl : line 2 : > /TMPL_IF end > ### HTML::Template Debug ### /templates/background.tpl : line 4 : > TMPL_IF login_page start > ### HTML::Template Debug ### /templates/background.tpl : line 5 : > INCLUDE login_page.tpl > ### HTML::Template Debug ### /templates/background.tpl : line 5 : > /TMPL_IF end > ### HTML::Template _param Stack Dump ### > bless( do{\(my $o = undef)}, 'HTML::Template::VAR' > ), > ], 'HTML::Template::COND' ), > bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), > bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), > bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), > bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), > bless( do{\(my $o = undef)}, 'HTML::Template::NOOP' ), > bless( do{\(my $o = undef)}, 'HTML::Template::VAR' > ), > ], 'HTML::Template::COND' ), > msg.innerHTML = "Your subscription expires in " + > daysTillExpired + " days. " + > document.getElementById(\'popupinfo\').innerHTML += > " <span style=\\"font-weight: bold; color: #FF0000;\\">Dual Windows > disabled due to popup blocker.</span>"; > _javarow.innerHTML = _html; > r.innerHTML = "<font color=red " + fSize + "><b>" + t + > "</b></font>" + addedTxt; > c.innerHTML = "<b>Event Name:</b>" + sText; > c.innerHTML=""; ### HTML::Template Cache Debug > ### CACHE LOAD : > /templates/background.tpl => a3b4215ada4a08b236710034cb1dd9c3 ### > HTML::Template Debug ### In output ### HTML::Template output Stack Dump > ### > bless( do{\(my $o = 1)}, 'HTML::Template::VAR' ), > ], 'HTML::Template::COND' ), > bless( do{\(my $o = '<!DOCTYPE HTML PUBLIC \'-//W3C//DTD HTML > 4.01 Transitional//EN\' \'http://www.w3.org/TR/html4/loose.dtd\'> > <td>')}, 'HTML::Template::VAR' ), > bless( do{\(my $o = '1')}, 'HTML::Template::VAR' ), > bless( do{\(my $o = 'Traders International')}, > 'HTML::Template::VAR' ), </html>')}, 'HTML::Template::VAR' ), > bless( do{\(my $o = undef)}, 'HTML::Template::NOOP' ), > bless( do{\(my $o = undef)}, 'HTML::Template::VAR' > ), > ], 'HTML::Template::COND' ), > msg.innerHTML = "Your subscription expires in " + > daysTillExpired + " days. " + > document.getElementById(\'popupinfo\').innerHTML += > " <span style=\\"font-weight: bold; color: #FF0000;\\">Dual Windows > disabled due to popup blocker.</span>"; > _javarow.innerHTML = _html; > r.innerHTML = "<font color=red " + fSize + "><b>" + t + > "</b></font>" + addedTxt; > c.innerHTML = "<b>Event Name:</b>" + sText; > c.innerHTML=""; > > > **** attempt #2 ****** > > > ### HTML::Template Debug ### In _parse: > ### HTML::Template Debug ### /templates/background.tpl : line 1 : > TMPL_IF login_menu start > ### HTML::Template Debug ### /templates/background.tpl : line 2 : > INCLUDE login_menu.tpl > ### HTML::Template Debug ### /templates/login_menu.tpl : line 1 : parsed > VAR header ### HTML::Template Debug ### /templates/login_menu.tpl : line > 13 : > parsed VAR companyid > ### HTML::Template Debug ### /templates/login_menu.tpl : line 17 : > parsed VAR companyname > ### HTML::Template Debug ### /templates/login_menu.tpl : line 22 : > parsed VAR companyid > ### HTML::Template Debug ### /templates/login_menu.tpl : line 23 : > parsed VAR companyid > ### HTML::Template Debug ### /templates/login_menu.tpl : line 31 : > parsed VAR companyid > ### HTML::Template Debug ### /templates/login_menu.tpl : line 32 : > parsed VAR companyid > ### HTML::Template Debug ### /templates/login_menu.tpl : line 35 : > parsed VAR footer > ### HTML::Template Debug ### /templates/background.tpl : line 2 : > /TMPL_IF end > ### HTML::Template Debug ### /templates/background.tpl : line 4 : > TMPL_IF login_page start > ### HTML::Template Debug ### /templates/background.tpl : line 5 : > INCLUDE login_page.tpl > ### HTML::Template Debug ### /templates/background.tpl : line 5 : > /TMPL_IF end > ### HTML::Template _param Stack Dump ### > bless( do{\(my $o = undef)}, 'HTML::Template::VAR' > ), > ], 'HTML::Template::COND' ), > bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), > bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), > bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), > bless( do{\(my $o = undef)}, 'HTML::Template::VAR' ), > bless( do{\(my $o = undef)}, 'HTML::Template::NOOP' ), > bless( do{\(my $o = undef)}, 'HTML::Template::VAR' > ), > ], 'HTML::Template::COND' ), > msg.innerHTML = "Your subscription expires in " + > daysTillExpired + " days. " + > document.getElementById(\'popupinfo\').innerHTML += > " <span style=\\"font-weight: bold; color: #FF0000;\\">Dual Windows > disabled due to popup blocker.</span>"; > _javarow.innerHTML = _html; > r.innerHTML = "<font color=red " + fSize + "><b>" + t + > "</b></font>" + addedTxt; > c.innerHTML = "<b>Event Name:</b>" + sText; > c.innerHTML=""; ### HTML::Template Cache Debug > ### CACHE LOAD : > /templates/background.tpl => a3b4215ada4a08b236710034cb1dd9c3 ### > HTML::Template Debug ### In output ### HTML::Template output Stack Dump > ### > bless( do{\(my $o = 1)}, 'HTML::Template::VAR' ), > ], 'HTML::Template::COND' ), > bless( do{\(my $o = '<!DOCTYPE HTML PUBLIC \'-//W3C//DTD HTML > 4.01 Transitional//EN\' \'http://www.w3.org/TR/html4/loose.dtd\'> > <td>')}, 'HTML::Template::VAR' ), > bless( do{\(my $o = '26')}, 'HTML::Template::VAR' ), > bless( do{\(my $o = 'TradingZoo')}, 'HTML::Template::VAR' ), > </html>')}, 'HTML::Template::VAR' ), > bless( do{\(my $o = undef)}, 'HTML::Template::NOOP' ), > bless( do{\(my $o = undef)}, 'HTML::Template::VAR' > ), > ], 'HTML::Template::COND' ), > msg.innerHTML = "Your subscription expires in " + > daysTillExpired + " days. " + > document.getElementById(\'popupinfo\').innerHTML += > " <span style=\\"font-weight: bold; color: #FF0000;\\">Dual Windows > disabled due to popup blocker.</span>"; > _javarow.innerHTML = _html; > r.innerHTML = "<font color=red " + fSize + "><b>" + t + > "</b></font>" + addedTxt; > c.innerHTML = "<b>Event Name:</b>" + sText; > c.innerHTML=""; > > > ******* attempt #3 ****** > > > ### HTML::Template Cache Debug ### CACHE HIT : > /some/path//pages/sctest/templates/background.tpl => > a3b4215ada4a08b236710034cb1dd9c3 > ### HTML::Template Debug ### In output > ### HTML::Template output Stack Dump ### > bless( do{\(my $o = 1)}, 'HTML::Template::VAR' ), > ], 'HTML::Template::COND' ), > bless( do{\(my $o = '<!DOCTYPE HTML PUBLIC \'-//W3C//DTD HTML > 4.01 Transitional//EN\' \'http://www.w3.org/TR/html4/loose.dtd\'> > <td>')}, 'HTML::Template::VAR' ), > bless( do{\(my $o = '1')}, 'HTML::Template::VAR' ), > bless( do{\(my $o = 'Traders International')}, > 'HTML::Template::VAR' ), </html>')}, 'HTML::Template::VAR' ), > bless( do{\(my $o = undef)}, 'HTML::Template::NOOP' ), > bless( do{\(my $o = undef)}, 'HTML::Template::VAR' > ), > ], 'HTML::Template::COND' ), > msg.innerHTML = "Your subscription expires in " + > daysTillExpired + " days. " + > document.getElementById(\'popupinfo\').innerHTML += > " <span style=\\"font-weight: bold; color: #FF0000;\\">Dual Windows > disabled due to popup blocker.</span>"; > _javarow.innerHTML = _html; > r.innerHTML = "<font color=red " + fSize + "><b>" + t + > "</b></font>" + addedTxt; > c.innerHTML = "<b>Event Name:</b>" + sText; > c.innerHTML=""; > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language that extends applications into web and mobile media. Attend the > live webcast and join the prime developer group breaking into this new > coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Html-template-users mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users > > > > ------------------------------------------------------------------------------ > This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642 > _______________________________________________ > Html-template-users mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users |
From: Paulsen, B. <BPa...@le...> - 2006-03-07 14:59:40
|
To expound a bit more on the "use strict;" line... The big difference between mod_perl and normal CGI execution is that in mod_perl, the forked child Apache process is used to serve up content. In normal CGI execution, a separate process is forked off and that is used. If you have global variables in your script, it doesn't matter in normal CGI execution because those are cleaned up when the forked process exits. In mod_perl, since there is no forked subprocess, global variables never get cleaned up. Instead, they are reused the next time that the script is executed. So, if you have something where your variables are undeclared and uninitialized, it will appear that mod_perl is caching old values for you. Having the "use strict;" line forces you to declare your variables, which usually puts them in a local scope. =46WIW, all of my CGI scripts look like this... use strict; sub printPage { ... Do all my processing here... } printPage; -----Original Message----- =46rom: htm...@li... [mailto:htm...@li...] On Behalf Of Matthew Boehm Sent: Tuesday, March 07, 2006 9:44 AM To: htm...@li... Subject: Re: [htmltmpl] mod_perl usage Here is some debug information. What follows is 3 attempts at my CGI.=20 =46irst was with the companyID of 1 (Traders International) 2nd was ID 26 (Trading Zoo) and 3rd was ID 2 (omNovia). Notice that the #3 attempt shows the same values from attempt #1 and that #3's debug output is MUCH less than the other 2. So who is caching this=3F Sounds like mod_perl is. This is bad. apologies for line wrapping.. Thanks, Matthew **** attempt #1 **** ### HTML::Template Debug ### In _parse: ### HTML::Template Debug ### /templates/background.tpl : line 1 :=20 TMPL_IF login_menu start ### HTML::Template Debug ### /templates/background.tpl : line 2 :=20 INCLUDE login_menu.tpl ### HTML::Template Debug ### /templates/login_menu.tpl : line 1 : parsed VAR header ### HTML::Template Debug ### /templates/login_menu.tpl : line 13 :=20 parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 17 :=20 parsed VAR companyname ### HTML::Template Debug ### /templates/login_menu.tpl : line 22 :=20 parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 23 :=20 parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 31 :=20 parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 32 :=20 parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 35 :=20 parsed VAR footer ### HTML::Template Debug ### /templates/background.tpl : line 2 :=20 /TMPL_IF end ### HTML::Template Debug ### /templates/background.tpl : line 4 :=20 TMPL_IF login_page start ### HTML::Template Debug ### /templates/background.tpl : line 5 :=20 INCLUDE login_page.tpl ### HTML::Template Debug ### /templates/background.tpl : line 5 :=20 /TMPL_IF end ### HTML::Template _param Stack Dump ### bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::NOOP' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), msg.innerHTML =3D "Your subscription expires in " + daysTillExpired + " days. " + document.getElementById(\'popupinfo\').innerHTML +=3D " <span style=3D\\"font-weight: bold; color: #FF0000;\\">Dual Windows disabled due to popup blocker.</span>"; _javarow.innerHTML =3D _html; r.innerHTML =3D "<font color=3Dred " + fSize + "><b>" + t + "</b></font>" + addedTxt; c.innerHTML =3D "<b>Event Name:</b>" + sText; c.innerHTML=3D""; ### HTML::Template Cache Debug ### CACHE LOAD :=20 /templates/background.tpl =3D> a3b4215ada4a08b236710034cb1dd9c3 ### HTML::Template Debug ### In output ### HTML::Template output Stack Dump ### bless( do{\(my $o =3D 1)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), bless( do{\(my $o =3D '<!DOCTYPE HTML PUBLIC \'-//W3C//DTD HTML 4.01 Transitional//EN\' \'http://www.w3.org/TR/html4/loose.dtd\'> <td>')}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D '1')}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D 'Traders International')}, 'HTML::Template::VAR' ), </html>')}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::NOOP' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), msg.innerHTML =3D "Your subscription expires in " + daysTillExpired + " days. " + document.getElementById(\'popupinfo\').innerHTML +=3D " <span style=3D\\"font-weight: bold; color: #FF0000;\\">Dual Windows disabled due to popup blocker.</span>"; _javarow.innerHTML =3D _html; r.innerHTML =3D "<font color=3Dred " + fSize + "><b>" + t + "</b></font>" + addedTxt; c.innerHTML =3D "<b>Event Name:</b>" + sText; c.innerHTML=3D""; **** attempt #2 ****** ### HTML::Template Debug ### In _parse: ### HTML::Template Debug ### /templates/background.tpl : line 1 :=20 TMPL_IF login_menu start ### HTML::Template Debug ### /templates/background.tpl : line 2 :=20 INCLUDE login_menu.tpl ### HTML::Template Debug ### /templates/login_menu.tpl : line 1 : parsed VAR header ### HTML::Template Debug ### /templates/login_menu.tpl : line 13 :=20 parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 17 :=20 parsed VAR companyname ### HTML::Template Debug ### /templates/login_menu.tpl : line 22 :=20 parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 23 :=20 parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 31 :=20 parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 32 :=20 parsed VAR companyid ### HTML::Template Debug ### /templates/login_menu.tpl : line 35 :=20 parsed VAR footer ### HTML::Template Debug ### /templates/background.tpl : line 2 :=20 /TMPL_IF end ### HTML::Template Debug ### /templates/background.tpl : line 4 :=20 TMPL_IF login_page start ### HTML::Template Debug ### /templates/background.tpl : line 5 :=20 INCLUDE login_page.tpl ### HTML::Template Debug ### /templates/background.tpl : line 5 :=20 /TMPL_IF end ### HTML::Template _param Stack Dump ### bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::NOOP' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), msg.innerHTML =3D "Your subscription expires in " + daysTillExpired + " days. " + document.getElementById(\'popupinfo\').innerHTML +=3D " <span style=3D\\"font-weight: bold; color: #FF0000;\\">Dual Windows disabled due to popup blocker.</span>"; _javarow.innerHTML =3D _html; r.innerHTML =3D "<font color=3Dred " + fSize + "><b>" + t + "</b></font>" + addedTxt; c.innerHTML =3D "<b>Event Name:</b>" + sText; c.innerHTML=3D""; ### HTML::Template Cache Debug ### CACHE LOAD :=20 /templates/background.tpl =3D> a3b4215ada4a08b236710034cb1dd9c3 ### HTML::Template Debug ### In output ### HTML::Template output Stack Dump ### bless( do{\(my $o =3D 1)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), bless( do{\(my $o =3D '<!DOCTYPE HTML PUBLIC \'-//W3C//DTD HTML 4.01 Transitional//EN\' \'http://www.w3.org/TR/html4/loose.dtd\'> <td>')}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D '26')}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D 'TradingZoo')}, 'HTML::Template::VAR' ), </html>')}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::NOOP' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), msg.innerHTML =3D "Your subscription expires in " + daysTillExpired + " days. " + document.getElementById(\'popupinfo\').innerHTML +=3D " <span style=3D\\"font-weight: bold; color: #FF0000;\\">Dual Windows disabled due to popup blocker.</span>"; _javarow.innerHTML =3D _html; r.innerHTML =3D "<font color=3Dred " + fSize + "><b>" + t + "</b></font>" + addedTxt; c.innerHTML =3D "<b>Event Name:</b>" + sText; c.innerHTML=3D""; ******* attempt #3 ****** ### HTML::Template Cache Debug ### CACHE HIT :=20 /some/path//pages/sctest/templates/background.tpl =3D> a3b4215ada4a08b236710034cb1dd9c3 ### HTML::Template Debug ### In output ### HTML::Template output Stack Dump ### bless( do{\(my $o =3D 1)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), bless( do{\(my $o =3D '<!DOCTYPE HTML PUBLIC \'-//W3C//DTD HTML 4.01 Transitional//EN\' \'http://www.w3.org/TR/html4/loose.dtd\'> <td>')}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D '1')}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D 'Traders International')}, 'HTML::Template::VAR' ), </html>')}, 'HTML::Template::VAR' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::NOOP' ), bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), ], 'HTML::Template::COND' ), msg.innerHTML =3D "Your subscription expires in " + daysTillExpired + " days. " + document.getElementById(\'popupinfo\').innerHTML +=3D " <span style=3D\\"font-weight: bold; color: #FF0000;\\">Dual Windows disabled due to popup blocker.</span>"; _javarow.innerHTML =3D _html; r.innerHTML =3D "<font color=3Dred " + fSize + "><b>" + t + "</b></font>" + addedTxt; c.innerHTML =3D "<b>Event Name:</b>" + sText; c.innerHTML=3D""; ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel=3Fcmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 _______________________________________________ Html-template-users mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/html-template-users ---------------------------------------------------------------------------= --- This message is intended only for the personal and confidential use of the = designated recipient(s) named above. If you are not the intended recipient= = of this message you are hereby notified that any review, dissemination, = distribution or copying of this message is strictly prohibited. This = communication is for information purposes only and should not be regarded a= s= an offer to sell or as a solicitation of an offer to buy any financial = product, an official confirmation of any transaction, or as an official = statement of Lehman Brothers. Email transmission cannot be guaranteed to b= e= secure or error-free. Therefore, we do not represent that this informatio= n= is complete or accurate and it should not be relied upon as such. All = information is subject to change without notice. |
From: Matthew B. <dr...@ma...> - 2006-03-07 15:22:13
|
Hmm. I am using strict, but I do have many "globals". Here are the first few lines of our program: #!/usr/bin/perl use strict; use warnings; use lib '/path/to/something/'; use tools qw($dbh $webpage_obj &displayError $template &messageDie); $template = new HTML::Template(filename => '/home/omnovia/public_html/pages/sctest/templates/background.tpl', path => '/home/omnovia/public_html/pages/sctest/templates/', cache => 1, debug => 1, stack_debug => 1, cache_debug => 1, die_on_bad_params => 0); tools::DBConnect(); my ($companyID, $firstName, $lastName, $companyUsername); <several more lines of my's before getting into functions> Interestingly enough, companyID (the main var) is listed in the first my block. So that's global scope and would not be cleared? Beginning to make sense now. $companyID is used in just about every function, which is why it was made global. Should I instead write a function that gets all the vars from the web call and just pass them in between function calls? As I'm sure you have all learned by now, I'm not a perl programmer.. Thanks, -Matthew |
From: Paulsen, B. <BPa...@le...> - 2006-03-07 15:12:10
|
Ok... I see that in most of my code, I'm calling HTML::Template with the =66ollowing parameters: cache =3D> 1, double_file_cache =3D> 1 When using HTML::Template::Expr, I do NOT set double_file_cache to 1 (I think because I had caching issues like you are describing)=20 -----Original Message----- =46rom: htm...@li... [mailto:htm...@li...] On Behalf Of Matthew Boehm Sent: Tuesday, March 07, 2006 9:59 AM To: htm...@li... Subject: Re: [htmltmpl] mod_perl usage Already using use strict, and using use warnings. And yes, the script works fine. -Matthew Paulsen, Brian wrote: > I have an idea of where the caching is happening... >=20 > Put this at the top of your script : > use strict; >=20 > Does your script still work=3F >=20 > -----Original Message----- > From: htm...@li... > [mailto:htm...@li...] On Behalf Of=20 > Matthew Boehm > Sent: Tuesday, March 07, 2006 9:44 AM > To: htm...@li... > Subject: Re: [htmltmpl] mod_perl usage >=20 > Here is some debug information. What follows is 3 attempts at my CGI.=20 > First was with the companyID of 1 (Traders International) 2nd was ID=20 > 26 (Trading Zoo) and 3rd was ID 2 (omNovia). Notice that the #3=20 > attempt shows the same values from attempt #1 and that #3's debug=20 > output is MUCH less than the other 2. >=20 > So who is caching this=3F Sounds like mod_perl is. This is bad. >=20 > apologies for line wrapping.. >=20 > Thanks, > Matthew >=20 > **** attempt #1 **** >=20 > ### HTML::Template Debug ### In _parse: > ### HTML::Template Debug ### /templates/background.tpl : line 1 :=20 > TMPL_IF login_menu start > ### HTML::Template Debug ### /templates/background.tpl : line 2 :=20 > INCLUDE login_menu.tpl > ### HTML::Template Debug ### /templates/login_menu.tpl : line 1 :=20 > parsed VAR header ### HTML::Template Debug ###=20 > /templates/login_menu.tpl : line > 13 :=20 > parsed VAR companyid > ### HTML::Template Debug ### /templates/login_menu.tpl : line 17 :=20 > parsed VAR companyname > ### HTML::Template Debug ### /templates/login_menu.tpl : line 22 :=20 > parsed VAR companyid > ### HTML::Template Debug ### /templates/login_menu.tpl : line 23 :=20 > parsed VAR companyid > ### HTML::Template Debug ### /templates/login_menu.tpl : line 31 :=20 > parsed VAR companyid > ### HTML::Template Debug ### /templates/login_menu.tpl : line 32 :=20 > parsed VAR companyid > ### HTML::Template Debug ### /templates/login_menu.tpl : line 35 :=20 > parsed VAR footer > ### HTML::Template Debug ### /templates/background.tpl : line 2 :=20 > /TMPL_IF end > ### HTML::Template Debug ### /templates/background.tpl : line 4 :=20 > TMPL_IF login_page start > ### HTML::Template Debug ### /templates/background.tpl : line 5 :=20 > INCLUDE login_page.tpl > ### HTML::Template Debug ### /templates/background.tpl : line 5 :=20 > /TMPL_IF end > ### HTML::Template _param Stack Dump ### > bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' > ), > ], 'HTML::Template::COND' ), > bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), > bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), > bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), > bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), > bless( do{\(my $o =3D undef)}, 'HTML::Template::NOOP' ), > bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' > ), > ], 'HTML::Template::COND' ), > msg.innerHTML =3D "Your subscription expires in " +=20 > daysTillExpired + " days. " + > document.getElementById(\'popupinfo\').innerHTML +=3D=20 > " <span style=3D\\"font-weight: bold; color: #FF0000;\\">Dual=20 > Windows disabled due to popup blocker.</span>"; > _javarow.innerHTML =3D _html; > r.innerHTML =3D "<font color=3Dred " + fSize + "><b>" + t +=20 > "</b></font>" + addedTxt; > c.innerHTML =3D "<b>Event Name:</b>" + sText; > c.innerHTML=3D""; ### HTML::Template Cache=20 > Debug ### CACHE LOAD : > /templates/background.tpl =3D> a3b4215ada4a08b236710034cb1dd9c3 ###=20 > HTML::Template Debug ### In output ### HTML::Template output Stack=20 > Dump ### > bless( do{\(my $o =3D 1)}, 'HTML::Template::VAR' ), > ], 'HTML::Template::COND' ), > bless( do{\(my $o =3D '<!DOCTYPE HTML PUBLIC \'-//W3C//DTD=20 > HTML > 4.01 Transitional//EN\' \'http://www.w3.org/TR/html4/loose.dtd\'> > <td>')}, 'HTML::Template::VAR' ), > bless( do{\(my $o =3D '1')}, 'HTML::Template::VAR' ), > bless( do{\(my $o =3D 'Traders International')},=20 > 'HTML::Template::VAR' ), </html>')}, 'HTML::Template::VAR' ), > bless( do{\(my $o =3D undef)}, 'HTML::Template::NOOP' ), > bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' > ), > ], 'HTML::Template::COND' ), > msg.innerHTML =3D "Your subscription expires in " +=20 > daysTillExpired + " days. " + > document.getElementById(\'popupinfo\').innerHTML +=3D=20 > " <span style=3D\\"font-weight: bold; color: #FF0000;\\">Dual=20 > Windows disabled due to popup blocker.</span>"; > _javarow.innerHTML =3D _html; > r.innerHTML =3D "<font color=3Dred " + fSize + "><b>" + t +=20 > "</b></font>" + addedTxt; > c.innerHTML =3D "<b>Event Name:</b>" + sText; > c.innerHTML=3D""; >=20 >=20 > **** attempt #2 ****** >=20 >=20 > ### HTML::Template Debug ### In _parse: > ### HTML::Template Debug ### /templates/background.tpl : line 1 :=20 > TMPL_IF login_menu start > ### HTML::Template Debug ### /templates/background.tpl : line 2 :=20 > INCLUDE login_menu.tpl > ### HTML::Template Debug ### /templates/login_menu.tpl : line 1 :=20 > parsed VAR header ### HTML::Template Debug ###=20 > /templates/login_menu.tpl : line > 13 :=20 > parsed VAR companyid > ### HTML::Template Debug ### /templates/login_menu.tpl : line 17 :=20 > parsed VAR companyname > ### HTML::Template Debug ### /templates/login_menu.tpl : line 22 :=20 > parsed VAR companyid > ### HTML::Template Debug ### /templates/login_menu.tpl : line 23 :=20 > parsed VAR companyid > ### HTML::Template Debug ### /templates/login_menu.tpl : line 31 :=20 > parsed VAR companyid > ### HTML::Template Debug ### /templates/login_menu.tpl : line 32 :=20 > parsed VAR companyid > ### HTML::Template Debug ### /templates/login_menu.tpl : line 35 :=20 > parsed VAR footer > ### HTML::Template Debug ### /templates/background.tpl : line 2 :=20 > /TMPL_IF end > ### HTML::Template Debug ### /templates/background.tpl : line 4 :=20 > TMPL_IF login_page start > ### HTML::Template Debug ### /templates/background.tpl : line 5 :=20 > INCLUDE login_page.tpl > ### HTML::Template Debug ### /templates/background.tpl : line 5 :=20 > /TMPL_IF end > ### HTML::Template _param Stack Dump ### > bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' > ), > ], 'HTML::Template::COND' ), > bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), > bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), > bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), > bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' ), > bless( do{\(my $o =3D undef)}, 'HTML::Template::NOOP' ), > bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' > ), > ], 'HTML::Template::COND' ), > msg.innerHTML =3D "Your subscription expires in " +=20 > daysTillExpired + " days. " + > document.getElementById(\'popupinfo\').innerHTML +=3D=20 > " <span style=3D\\"font-weight: bold; color: #FF0000;\\">Dual=20 > Windows disabled due to popup blocker.</span>"; > _javarow.innerHTML =3D _html; > r.innerHTML =3D "<font color=3Dred " + fSize + "><b>" + t +=20 > "</b></font>" + addedTxt; > c.innerHTML =3D "<b>Event Name:</b>" + sText; > c.innerHTML=3D""; ### HTML::Template Cache=20 > Debug ### CACHE LOAD : > /templates/background.tpl =3D> a3b4215ada4a08b236710034cb1dd9c3 ###=20 > HTML::Template Debug ### In output ### HTML::Template output Stack=20 > Dump ### > bless( do{\(my $o =3D 1)}, 'HTML::Template::VAR' ), > ], 'HTML::Template::COND' ), > bless( do{\(my $o =3D '<!DOCTYPE HTML PUBLIC \'-//W3C//DTD=20 > HTML > 4.01 Transitional//EN\' \'http://www.w3.org/TR/html4/loose.dtd\'> > <td>')}, 'HTML::Template::VAR' ), > bless( do{\(my $o =3D '26')}, 'HTML::Template::VAR' ), > bless( do{\(my $o =3D 'TradingZoo')}, 'HTML::Template::VAR'=20 > ), </html>')}, 'HTML::Template::VAR' ), > bless( do{\(my $o =3D undef)}, 'HTML::Template::NOOP' ), > bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' > ), > ], 'HTML::Template::COND' ), > msg.innerHTML =3D "Your subscription expires in " +=20 > daysTillExpired + " days. " + > document.getElementById(\'popupinfo\').innerHTML +=3D=20 > " <span style=3D\\"font-weight: bold; color: #FF0000;\\">Dual=20 > Windows disabled due to popup blocker.</span>"; > _javarow.innerHTML =3D _html; > r.innerHTML =3D "<font color=3Dred " + fSize + "><b>" + t +=20 > "</b></font>" + addedTxt; > c.innerHTML =3D "<b>Event Name:</b>" + sText; > c.innerHTML=3D""; >=20 >=20 > ******* attempt #3 ****** >=20 >=20 > ### HTML::Template Cache Debug ### CACHE HIT :=20 > /some/path//pages/sctest/templates/background.tpl =3D> > a3b4215ada4a08b236710034cb1dd9c3 > ### HTML::Template Debug ### In output ### HTML::Template output Stack > Dump ### > bless( do{\(my $o =3D 1)}, 'HTML::Template::VAR' ), > ], 'HTML::Template::COND' ), > bless( do{\(my $o =3D '<!DOCTYPE HTML PUBLIC \'-//W3C//DTD=20 > HTML > 4.01 Transitional//EN\' \'http://www.w3.org/TR/html4/loose.dtd\'> > <td>')}, 'HTML::Template::VAR' ), > bless( do{\(my $o =3D '1')}, 'HTML::Template::VAR' ), > bless( do{\(my $o =3D 'Traders International')},=20 > 'HTML::Template::VAR' ), </html>')}, 'HTML::Template::VAR' ), > bless( do{\(my $o =3D undef)}, 'HTML::Template::NOOP' ), > bless( do{\(my $o =3D undef)}, 'HTML::Template::VAR' > ), > ], 'HTML::Template::COND' ), > msg.innerHTML =3D "Your subscription expires in " +=20 > daysTillExpired + " days. " + > document.getElementById(\'popupinfo\').innerHTML +=3D=20 > " <span style=3D\\"font-weight: bold; color: #FF0000;\\">Dual=20 > Windows disabled due to popup blocker.</span>"; > _javarow.innerHTML =3D _html; > r.innerHTML =3D "<font color=3Dred " + fSize + "><b>" + t +=20 > "</b></font>" + addedTxt; > c.innerHTML =3D "<b>Event Name:</b>" + sText; > c.innerHTML=3D""; >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting=20 > language that extends applications into web and mobile media. Attend=20 > the live webcast and join the prime developer group breaking into this > new coding territory! > = http://sel.as-us.falkag.net/sel=3Fcmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D1216 > 42 _______________________________________________ > Html-template-users mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users >=20 >=20 >=20 > ---------------------------------------------------------------------- > -------- This message is intended only for the personal and=20 > confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting=20 > language that extends applications into web and mobile media. Attend=20 > the live webcast and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel=3Fcmd=3Dk&kid=110944&bid$1720&dat=121642 > _______________________________________________ > Html-template-users mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel=3Fcmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 _______________________________________________ Html-template-users mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/html-template-users ---------------------------------------------------------------------------= --- This message is intended only for the personal and confidential use of the = designated recipient(s) named above. If you are not the intended recipient= = of this message you are hereby notified that any review, dissemination, = distribution or copying of this message is strictly prohibited. This = communication is for information purposes only and should not be regarded a= s= an offer to sell or as a solicitation of an offer to buy any financial = product, an official confirmation of any transaction, or as an official = statement of Lehman Brothers. Email transmission cannot be guaranteed to b= e= secure or error-free. Therefore, we do not represent that this informatio= n= is complete or accurate and it should not be relied upon as such. All = information is subject to change without notice. |
From: Paulsen, B. <BPa...@le...> - 2006-03-07 15:29:14
|
If you can put something together easily and test it out, I would suggest the function that you are describing. If you are using the CGI package, you should be able to simply pass around the CGI object. Brian=20 -----Original Message----- =46rom: htm...@li... [mailto:htm...@li...] On Behalf Of Matthew Boehm Sent: Tuesday, March 07, 2006 10:22 AM To: htm...@li... Subject: Re: [htmltmpl] mod_perl usage Hmm. I am using strict, but I do have many "globals". Here are the =66irst few lines of our program: #!/usr/bin/perl use strict; use warnings; use lib '/path/to/something/'; use tools qw($dbh $webpage_obj &displayError $template &messageDie); $template =3D new HTML::Template(filename =3D> '/home/omnovia/public_html/pages/sctest/templates/background.tpl', path =3D> '/home/omnovia/public_html/pages/sctest/templates/', cache =3D> 1, debug =3D> 1, stack_debug =3D> 1, cache_debug =3D> 1, die_on_bad_params =3D> 0); tools::DBConnect(); my ($companyID, $firstName, $lastName, $companyUsername); <several more lines of my's before getting into functions> Interestingly enough, companyID (the main var) is listed in the first my block. So that's global scope and would not be cleared=3F Beginning to make sense now. $companyID is used in just about every =66unction, which is why it was made global. Should I instead write a =66unction that gets all the vars from the web call and just pass them in between function calls=3F As I'm sure you have all learned by now, I'm not a perl programmer.. Thanks, -Matthew ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel=3Fcmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 _______________________________________________ Html-template-users mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/html-template-users ---------------------------------------------------------------------------= --- This message is intended only for the personal and confidential use of the = designated recipient(s) named above. If you are not the intended recipient= = of this message you are hereby notified that any review, dissemination, = distribution or copying of this message is strictly prohibited. This = communication is for information purposes only and should not be regarded a= s= an offer to sell or as a solicitation of an offer to buy any financial = product, an official confirmation of any transaction, or as an official = statement of Lehman Brothers. Email transmission cannot be guaranteed to b= e= secure or error-free. Therefore, we do not represent that this informatio= n= is complete or accurate and it should not be relied upon as such. All = information is subject to change without notice. |
From: Matthew B. <dr...@ma...> - 2006-03-07 17:28:48
|
I jumped the gun on this one. I have two versions of our CGI. They are exactly the same except version 2 uses HTML::Template. Version 1 doesn't experience this cache problem. Version 2 does. This is why I believe HTMLTemp is causing this in conjunction with mod_perl. I'm going to try a telnet test and see what results come. -Matthew > Hmm. I am using strict, but I do have many "globals". Here are the > first few lines of our program: > > #!/usr/bin/perl > > use strict; > use warnings; > > use lib '/path/to/something/'; > use tools qw($dbh $webpage_obj &displayError $template &messageDie); > > $template = new HTML::Template(filename => > '/home/omnovia/public_html/pages/sctest/templates/background.tpl', > path => > '/home/omnovia/public_html/pages/sctest/templates/', > cache => 1, > debug => 1, > stack_debug => 1, > cache_debug => 1, > die_on_bad_params => 0); > > tools::DBConnect(); > > my ($companyID, $firstName, $lastName, $companyUsername); > <several more lines of my's before getting into functions> > > As I'm sure you have all learned by now, I'm not a perl programmer.. > > Thanks, > -Matthew |
From: Matthew B. <dr...@ma...> - 2006-03-07 14:00:15
|
> I have no experience of ModPerl::PerlRun. How then are you running ModPerl? My apache conf contains this which activates mod_perl for a specific directory on our web server: <Directory /home/me/public_html/pages/sc2/> Options +ExecCGI <FilesMatch "\.cgi$"> SetHandler perl-script PerlResponseHandler ModPerl::PerlRun PerlOptions +ParseHeaders </FilesMatch> </Directory> > Make sure it is not you browser that is caching the page as a first off. I've disabled cache on the browsers and tried different browsers on different OSes. Same 'caching' behavior from the template module. > How does ModPerl::PerlRun work? I don't even begin to pretend to know anything about mod_perl, but from the docs "ModPerl::PerlRun - Run unaltered CGI scripts under mod_perl". If you use ModPerl::Registry, the docs say quite outright that your script gets compiled and stored in memory. We discovered this during our first attempts at modperl. Using Registry, our main CGI results would get cached using our own template model. So we switched to PerlRun and the caching stopped. Now I'm trying to use a template and the caching is back even though nothing else has changed in our setup. It was my understanding that mod_perl does nothing for you unless you 'activate' it for a directory/vhost like I did above. > Also, you should see if you can get a full blown mod_perl server running. Here is our server: Server version: Apache/2.0.55 Server built: Oct 23 2005 13:44:20 Compiled in modules: core.c mod_perl.c prefork.c http_core.c mod_so.c Is that full-blown enough? Thanks, Matthew |