From: Andy Grundman Date: Tue, 2 Aug 2005 17:43:15 +0000 (+0000) Subject: Removed apparently unnecessary finish statements X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=244b1ee9eb3a410139b08ec2c44303de7ac104a6;p=dbsrgits%2FDBIx-Class-Historic.git Removed apparently unnecessary finish statements --- diff --git a/lib/DBIx/Class/CDBICompat/LazyLoading.pm b/lib/DBIx/Class/CDBICompat/LazyLoading.pm index 21bcdcd..d15345a 100644 --- a/lib/DBIx/Class/CDBICompat/LazyLoading.pm +++ b/lib/DBIx/Class/CDBICompat/LazyLoading.pm @@ -28,7 +28,6 @@ sub _flesh { $self->_ident_cond); $sth->execute($self->_ident_values); my @val = $sth->fetchrow_array; - $sth->finish; foreach my $w (@want) { $self->{'_column_data'}{$w} = shift @val; } diff --git a/lib/DBIx/Class/Table.pm b/lib/DBIx/Class/Table.pm index b02f071..d6f65c9 100644 --- a/lib/DBIx/Class/Table.pm +++ b/lib/DBIx/Class/Table.pm @@ -54,7 +54,6 @@ sub insert { my $sth = $self->_get_sth('insert', [ keys %{$self->{_column_data}} ], $self->_table_name, undef); $sth->execute(values %{$self->{_column_data}}); - $sth->finish; $self->in_database(1); $self->{_dirty_columns} = {}; return $self; @@ -81,7 +80,6 @@ sub update { $self->_table_name, $self->_ident_cond); my $rows = $sth->execute( (map { $self->{_column_data}{$_} } @to_update), $self->_ident_values ); - $sth->finish; if ($rows == 0) { $self->throw( "Can't update $self: row not found" ); } elsif ($rows > 1) { @@ -99,7 +97,6 @@ sub delete { my $sth = $self->_get_sth('delete', undef, $self->_table_name, $self->_ident_cond); $sth->execute($self->_ident_values); - $sth->finish; $self->in_database(undef); } else { my $attrs = { }; @@ -110,7 +107,6 @@ sub delete { my ($cond, @param) = $self->_cond_resolve($query, $attrs); my $sth = $self->_get_sth('delete', undef, $self->_table_name, $cond); $sth->execute(@param); - $sth->finish; } return $self; } @@ -179,7 +175,6 @@ sub count_from_sql { #warn "$cond @vals"; $sth->execute(@vals); my ($count) = $sth->fetchrow_array; - $sth->finish; return $count; }