On Tue, 15 Aug 2000, Vladislav Safronov wrote:

> Hi,
> 
> Could you have a look at the lines and answer the question ..
> ---
> sub foo {
>       my $dbh = shift;
> 
>       my $sql = ...
> 
>       my $sth = $dbh->prepare($sql);
>       $sth->execute;
>       $sth->finish;
> }
> ===
> Do I always need to call $sth->finish? Wouldn't it be automaticly called
> when
> sub foo ends (when my variable $sth get destroyed)?

$sth doesn't always get destroyed when foo ends (due to a bug in all
perls). But otherwise, yes.

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org

Reply via email to