Thanks

"Sterin, Ilya" wrote:
> 
> Well it depends, though nothing will hand unless there is a bug or you make
> it hang.
> 
> If you set RaiseError => 1, then the program will exit on error in any
> subroutine.  You can catch your errors using eval and therefore do anything
> you want when an error is generated.  I still don't see why you would think
> that this will hang.
> 
> If your error checking is not turned on, the PrintError is turned on by
> default and will generate warnings and keep going, though it will finally
> fail, since if for example a prepare call fails it returns undef as a
> statement handle and therefore the next call to it, will generate a perl
> error stating that it can't call a method on an undefined object.
> 
> Ilya
> 
> > -----Original Message-----
> > From: Anthony Scott [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, September 24, 2001 5:49 PM
> > To: [EMAIL PROTECTED]
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: General Question DBI
> >
> >
> > No, not a diffrent process but will the current process hang due
> > to error in the
> > subroutine test1. Another example, if test1 had an infinite loop
> > I would expect
> > $dbh process to remain open, right? I'm just polling the group to
> > find out if
> > anyone writing code like this and what are the pit-fall :(
> >
> >
> > Anthony Scott
> >
> > "Sterin, Ilya" wrote:
> > >
> > > Not sure what you mean.  You are reusing a global handle, if
> > you mean will
> > > there be a memory leak, no since everything is deallocated at end of
> > > execution.  Otherwise I am not exactly sure, why you would think that a
> > > different process is created:-?
> > >
> > > Ilya
> > >
> > > > -----Original Message-----
> > > > From: Anthony Scott [mailto:[EMAIL PROTECTED]]
> > > > Sent: Monday, September 24, 2001 4:39 PM
> > > > Cc: [EMAIL PROTECTED]
> > > > Subject: General Question DBI
> > > >
> > > >
> > > >
> > > >
> > > > if I have the following code
> > > >
> > > >
> > > >  sub test {
> > > >
> > > >
> > > >  $dbh =get_dbh;
> > > >
> > > >
> > > >
> > > >  test1($dbh,$somedata);
> > > >
> > > >
> > > >  close($dbh);
> > > >
> > > >
> > > > }
> > > >
> > > >
> > > > sub test1 {
> > > >
> > > >   my ($dbh,$data)=@_;
> > > >
> > > >
> > > >   #sql code
> > > >
> > > >
> > > > }
> > > >
> > > >
> > > > if the $sql code fails in subroutine  "test1" does it causes a
> > > > open process
> > > > since I defined $dbh as local?
> > > >
> > > >
> > > >
> > > > Anthony Scott

Reply via email to