Skip Menu | will be shut down on March 1st, 2021.

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

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

Owner: Nobody in particular
Requestors: mat [...]

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
Download (untitled) / with headers
text/plain 513b
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.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to