Re: global data .....

[prev] [thread] [next] [Date index for 2005/01/28]

From: Perrin Harkins
Subject: Re: global data .....
Date: 20:01 on 28 Jan 2005
On Fri, 2005-01-28 at 21:35 +0200, raptor wrote:
>   my $loader = Class::DBI::Loader->new(
[...]
> So that later $loader be accessible from anywhere and more importantly
> all the Blah::... modules too..

I'm guessing you want to put that in a global, not a lexical ("my")
variable.

Also, if you do it before the server forks, make sure that you close the
database connection.  I've posted other information about using
Class::DBI with mod_perl, which you can find in the archives.

> One more thing I will want f.e. to modify generated classes !! any
> idea on this too...

You should be able to just add anything to any package at any time:

package My::GeneratedClass;

sub new_sub_that_loader_did_not_make {
...
}

- Perrin

(message missing)

global data .....
raptor 19:35 on 28 Jan 2005

Re: global data .....
Perrin Harkins 20:01 on 28 Jan 2005

Re: global data .....
raptor 22:19 on 28 Jan 2005

Re: global data .....
Perrin Harkins 05:09 on 29 Jan 2005

Re: global data .....
raptor 16:54 on 29 Jan 2005

Re: global data .....
Perrin Harkins 02:57 on 30 Jan 2005

Re: global data .....
raptor 16:34 on 30 Jan 2005

Generated at 12:39 on 05 Feb 2005 by mariachi v0.52