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