On Mon, Dec 31, 2001 at 11:05:38AM -0800, Rob Bloodgood wrote: > > On Sun, Dec 30, 2001 at 12:10:32PM +0100, Bart Lateur wrote: > > > On Fri, 28 Dec 2001 12:45:08 -0500, Hardy Merrill wrote: > > > > > > > $dbh->{RaiseError} = 1; > > > > > > Just a sidenote: you can use "local" here (even if $dbh is a lexical). > > > > > > local $dbh->{RaiseError} = 1; > > > > > > This will restore the old value of this property when the current block > > > is exited. > > > > Though sadly will leak memory in many versions of perl. So use it anywhere > > except long-lived memory-leak sensitive applications. > > Will it leak if $dbh is a lexical, or in general?
It's applying local to an element of a tied hash (or array, probably) that leaks. Google is your friend: http://www.google.com/search?q=leak+tie+local+perl Tim.