On Friday, October 1, 2004, at 07:46  AM, Sean Davis wrote:

<snip>
I'm thinking that I have two options:

1)  open a second database handle directly to DBI (not ideal)
2)  inherit DBI methods in my ntDBH package

Actually, in my design, the CGI::Session code is in my SuperApp subclass, so it does use a different database handle. All of my apps, which are related in login information, use the same db for session management. However, if one needs a db for specific application information, it's a different database handle (and database, for that matter). Logically, the two aren't the same at all, IMHO.


Sorry.  Figured out my own answer.  Following below:

in CGI::App,

$self->dbh->dbh is now a database handle.

And personally I code so that I'd have to use $self->dbh->{_dbh} to get to the db handle, which reminds me I'm not supposed to do that. IMHO, letting yourself go straight to the db handle breaks the encapsulation you're supposed to have in OO design and leads to messy code.


Jaclyn


--------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to