-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
* Mark Mills <mark at xodiax.com> [2003-07-21 16:21]:
> Also, does anyone have a better suggestion as to how the poor,
> original poster can avoid cashed DBI handles blowing up in his
> face? I'm betting that one comes up again.
Blah blah blah useful suggestions blah blah blah... ;)
How about not using cached handles:
[% USE DBI(dsn = 'dbi:blah:blah:blah'
dbi_connect_method = 'connect') %]
Search for dbi_connect_method in `perldoc DBI`:
The "dbi_connect_method" attribute can be used to
specify which driver method should be called to estab-
lish the connection. The only useful values are 'con-
nect', 'connect_cached', or some specialized case like
'Apache::DBI::connect' (which is automatically the
default when running within Apache).
The DBI plugin uses connect_cached, which is a thin wrapper around
connect:
# --- The DBI->connect Front Door methods
sub connect_cached {
# XXX we expect Apache::DBI users to still call connect()
my ($class, $dsn, $user, $pass, $attr) = @_;
($attr ||= {})->{dbi_connect_method} = 'connect_cached';
return $class->connect($dsn, $user, $pass, $attr);
}
Which means that setting dbi_connect_method will override it.
(darren)
- --
I'd crawl over an acre of 'Visual This++' and 'Integrated Development
That' to get to gcc, Emacs, and gdb.
-- Vance Petree
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: This message is digitally signed and can be verified for authenticity.
iD8DBQE/HE6gzsinjrVhZaoRAnYSAJ4uIrZtifPiiukmZyj+h/ItRO2ZlgCfSpZ5
fhDPKIOBki8xcE6712Lakt0=
=AcaR
-----END PGP SIGNATURE-----
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates