Re: invoking insert method inside a transaction eval

2002-01-07 Thread Terrence Brannon
On Monday, January 7, 2002, at 08:17 AM, Tim Bunce wrote: > Umm, these days you'd use $dbh->begin_work, right? > > that's funny. that method is not in my docs on my home machine, but it certainly is on the docs at CPAN... i had not seen it before. the extra things that the transaction method

Re: invoking insert method inside a transaction eval

2002-01-07 Thread Terrence Brannon
On Monday, January 7, 2002, at 08:17 AM, Tim Bunce wrote: > Umm, these days you'd use $dbh->begin_work, right? > > that's funny. that method is not in my docs on my home machine, but it certainly is on the docs at CPAN... i had not seen it before. the only thing that the transaction methods

Re: invoking insert method inside a transaction eval

2002-01-07 Thread Terrence Brannon
On Monday, January 7, 2002, at 08:17 AM, Tim Bunce wrote: > Umm, these days you'd use $dbh->begin_work, right? > >> I didn't see this in my version of DBI, which I thought was 1.20 but indeed it is documented in the docs on CPAN. The documented behavior is the same as the methods in DBIx.pm

Re: invoking insert method inside a transaction eval

2002-01-07 Thread Tim Bunce
Umm, these days you'd use $dbh->begin_work, right? Tim. On Mon, Jan 07, 2002 at 07:36:45AM -0500, Terrence Brannon wrote: > Matt Seargent had an excellent way to open and close transactions > in the Example::DB::Default class > of the AnyDBD distribution. It saves you from the manual > attribu

Re: invoking insert method inside a transaction eval

2002-01-07 Thread Terrence Brannon
Matt Seargent had an excellent way to open and close transactions in the Example::DB::Default class of the AnyDBD distribution. It saves you from the manual attribute-toggling tedium, you are engaging in below. Since he was too humble/busy to make this a general CPAN module, I have done so. It

Re: invoking insert method inside a transaction eval

2002-01-01 Thread Tim Bunce
On Tue, Jan 01, 2002 at 01:20:18PM +0100, Bart Lateur wrote: > On Tue, 1 Jan 2002 11:44:11 +, Tim Bunce wrote: > > >> 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: > > >

Re: invoking insert method inside a transaction eval

2002-01-01 Thread Bart Lateur
On Tue, 1 Jan 2002 11:44:11 +, Tim Bunce wrote: >> 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 So, is a DBI database

Re: invoking insert method inside a transaction eval

2002-01-01 Thread Tim Bunce
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

RE: invoking insert method inside a transaction eval

2001-12-31 Thread Rob Bloodgood
> 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

Re: invoking insert method inside a transaction eval

2001-12-30 Thread Tim Bunce
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 ol

Re: invoking insert method inside a transaction eval

2001-12-30 Thread Bart Lateur
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. -- Bart.

RE: invoking insert method inside a transaction eval

2001-12-28 Thread Wilson, Doug
> From: Hardy Merrill [mailto:[EMAIL PROTECTED]] > $dbh->{RaiseError} = 1; You might want to turn PrintError off when RaiseError is on... > But it seems like it won't work - an eval in an eval - can > someone just confirm for me that this won't work? An eval within an eval is fine. It's the b