Using class wide variables under mod_perl is safe?

2003-10-08 Thread Morton-Allen, Matt
Hi, I'm trying to find a way in which I can stash some commonly used data (e.g. a database handle) in a location that I can access from anywhere within a large OO mod_perl application. After learning the ills of using globals under mod_perl the hard way I am now toying with the use of class wide

RE: Using class wide variables under mod_perl is safe?

2003-10-08 Thread Morton-Allen, Matt
cond, for a global, you would do: our $dbh; # instead of the older use vars qw( $dbh ); You do that in the test::master package and then in the derived classes. Look up 'our' in Programming Perl, 3rd edition, page 755. At 10:13 AM +1000 10/9/03, Morton-Allen, Matt wrote: >

RE: Using class wide variables under mod_perl is safe?

2003-10-08 Thread Morton-Allen, Matt
Hi, Thanks for the detailed information that's great. A couple of things though. > A database handle is a bad example. You actually should use Apache::DBI > for that, since it will make sure the handle hasn't timed out and deal > with rolling back any pending transactions if your code dies. So,

RE: Using class wide variables under mod_perl is safe?

2003-10-08 Thread Morton-Allen, Matt
-Original Message- > From: Perrin Harkins [mailto:[EMAIL PROTECTED] > Sent: Thursday, 9 October 2003 2:22 PM > To: Morton-Allen, Matt > Cc: Matisse Enzer; [EMAIL PROTECTED] > Subject: RE: Using class wide variables under mod_perl is safe? > > On Wed, 2003-10-08 at 23:33

RE: Using class wide variables under mod_perl is safe?

2003-10-09 Thread Morton-Allen, Matt
g in the traditional startup.pl might be having some effect. Is this possible? > -Original Message- > From: Perrin Harkins [mailto:[EMAIL PROTECTED] > Sent: Friday, 10 October 2003 1:36 AM > To: Morton-Allen, Matt > Cc: [EMAIL PROTECTED] > Subject: RE: Using class wide variabl

RE: Using class wide variables under mod_perl is safe?

2003-10-09 Thread Morton-Allen, Matt
As I mentioned earlier I tend to use CGI for early development so I know what I am dealing with. Matt. > -Original Message- > From: Perrin Harkins [mailto:[EMAIL PROTECTED] > Sent: Friday, 10 October 2003 1:36 AM > To: Morton-Allen, Matt > Cc: [EMAIL PROTECTED] > Subjec