* Evan Carroll <[EMAIL PROTECTED]> [2007-05-06 10:55]:
> With that said, the patch provided has no drawbacks, and even
> if you only use the most minimal functionality of M::DBI, with
> the current code, you don't have a connection until the first
> ->dbh is called, which is no bueno. (work that is better
> handled at compile-time)
That is precisely the patch’s drawback. Connecting lazily rather
than eagerly is a feature.
However, that’s not hard to correct, although the patch would be
larger: rather than squirreling away a connection in `new`,
squirrel away a reference to an undef scalar. Then you can assign
the handle to that scalar, and it will be shared among everyone
who kept a copy of the same reference.
--
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1}
&Just->another->Perl->hack;
#Aristotle
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/