Re: [cgiapp] code reuse.

2008-03-17 Thread James.Q.L
--- Mark Fuller [EMAIL PROTECTED] wrote: On Sun, Mar 16, 2008 at 4:31 PM, James.Q.L [EMAIL PROTECTED] wrote: I store ONLY $uuid in param because i need it in other controller. i am passing $dbh to Company:: modules because these modules are not inherited from C::A. The example your

Re: [cgiapp] code reuse.

2008-03-17 Thread Michael Peters
James.Q.L wrote: I might be missing the point, but what's wrong with storing $uuid in Company::Util as an our variable and accessing it from anywhere as $Company::Util::uuid ? correct me if i am wrong. that won't work under mod_perl. because our $uuid is a global package variable and

Re: [cgiapp] code reuse.

2008-03-17 Thread Mark Fuller
On Mon, Mar 17, 2008 at 7:05 AM, James.Q.L [EMAIL PROTECTED] wrote: I might be missing the point, but what's wrong with storing $uuid in Company::Util as an our variable and accessing it from anywhere as $Company::Util::uuid ? correct me if i am wrong. that won't work under mod_perl.

Re: [cgiapp] code reuse.

2008-03-17 Thread James.Q.L
--- Mark Fuller [EMAIL PROTECTED] wrote: On Mon, Mar 17, 2008 at 7:05 AM, James.Q.L [EMAIL PROTECTED] wrote: I might be missing the point, but what's wrong with storing $uuid in Company::Util as an our variable and accessing it from anywhere as $Company::Util::uuid ? correct me

Re: [cgiapp] code reuse.

2008-03-17 Thread Mark Fuller
On Mon, Mar 17, 2008 at 1:00 PM, James.Q.L [EMAIL PROTECTED] wrote: i think you are right. it is fine as long as the global variable is explicitly initialized. No problem. So, what I was thinking is that you could initialize the our $uuid with specific method you'd call from cgiapp_init (like

RE: [cgiapp] code reuse.

2008-03-17 Thread Dan Horne
. -Original Message- From: [EMAIL PROTECTED] [mailto:cgiapp- [EMAIL PROTECTED] On Behalf Of Mark Fuller Sent: Tuesday, 18 March 2008 9:34 a.m. To: CGI Application Subject: Re: [cgiapp] code reuse. James, Another thought. If these routines are meant to be reused among various C

Re: [cgiapp] code reuse.

2008-03-16 Thread James.Q.L
--- Mark Fuller [EMAIL PROTECTED] wrote: 1. You're storing $dbh and $uuid as a param in C::A. Why are you passing them as parameters instead of retrieving them from param? I store ONLY $uuid in param because i need it in other controller. i am passing $dbh to Company:: modules because these

Re: [cgiapp] code reuse.

2008-03-16 Thread Mark Fuller
On Sun, Mar 16, 2008 at 4:31 PM, James.Q.L [EMAIL PROTECTED] wrote: I store ONLY $uuid in param because i need it in other controller. i am passing $dbh to Company:: modules because these modules are not inherited from C::A. The example your provided showed them being passed as parameters to