RE: [htmltmpl] mod_perl usage
Brought to you by:
samtregar
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. |