Skip Menu |

This queue is for tickets about the Class-DBI CPAN distribution.

Report information
The Basics
Id: 12179
Status: new
Priority: 0/
Queue: Class-DBI

People
Owner: Nobody in particular
Requestors: mat [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 0.94
  • 0.95
  • 0.96
Fixed in: (no value)



Subject: About the sub do_transaction in the pod
sub do_transaction { my $class = shift; my ( $code ) = @_; local $class->db_Main->{ AutoCommit }; eval { $code->() }; if ( $@ ) { my $commit_error = $@; eval { $class->dbi_rollback }; # might also die! die $commit_error; } } I tried that sub using postgresql, and it lacks a $class->dbi_commit; at the end, without it, the autocommit magic comes back to true when the blocks exits and the transaction is rolled back.