Re: ASP setup using common set of C::DBI modules

[prev] [thread] [next] [Date index for 2004/07/28]

From: Michael Graham
Subject: Re: ASP setup using common set of C::DBI modules
Date: 22:01 on 28 Jul 2004
Quoting Tony Bowden <tony-cdbitalk@xxxxx.xxx>:

> One slight problem with this is your use of CLASS. This means that
> subclasses can't provide their own default attributes.
>
> You'd be better off here with:
>
>      sub db_Main {
>          my $class = shift;
>          my ($dsn, $user, $pass) =
> My::Config->get_config('dbi_connection_info');
>          my %attr = $class->_default_attributes();
>          return DBI->connect_cached($dsn, $user, $pass, \%attr);
>      }

Ah - cool.  I was wondering about that as I wrote it.  Thanks.

Michael



--
Michael Graham
magog@xxxxxxxx.xxx

ASP setup using common set of C::DBI modules
jason scott gessner 19:43 on 28 Jul 2004

Re: ASP setup using common set of C::DBI modules
Michael Graham 20:33 on 28 Jul 2004

Re: ASP setup using common set of C::DBI modules
Michael Graham 22:01 on 28 Jul 2004

Re: ASP setup using common set of C::DBI modules
jason scott gessner 20:24 on 29 Jul 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52