perl-DBIx-ScopedTransaction - Scope database transactions on DBI handles in code, to detect and prevent issues with unterminated

Distribution: ALT Linux Sisyphus
Repository: Autoimports noarch
Package name: perl-DBIx-ScopedTransaction
Package version: 1.2.0
Package release: alt1
Package architecture: noarch
Package type: rpm
Installed size: 31.49 KB
Download size: 31.49 KB
Official Mirror:
Small class designed to be instantiated in a localized scope. Its purpose is to start and then clean up a transaction on a DBI object, while detecting cases where the transaction isn't terminated properly. The synopsis has an example of working code, let's see here an example in which DBIx::ScopedTransaction helps us to detect a logic error in how the programmer handled terminating the transaction. _sub test _{ __my $transaction = DBIx::ScopedTransaction->new( $dbh ); __try __{ ___# Do some work on $dbh that may succeed or fail. __} __catch __{ ___$transaction->rollback(); __}; _} _test(); As soon as the test() function has been run, $transaction goes out of scope and gets destroyed by Perl. DBIx::ScopedTransaction subclasses destroy and detects that the underlying transaction has neither been committed nor rolled back, and forces a rollback for safety as well as prints details on what code should be reviewed on STDERR.




  • perl(DBIx/ = 1.002
  • perl-DBIx-ScopedTransaction = 1.2.0-alt1

    Install Howto

    1. Add the following line to /etc/apt/sources.list:
      rpm [Sisyphus] noarch autoimports
      rpm [Sisyphus] noarch autoimports
    2. Update the package index:
      # sudo apt-get update
    3. Install perl-DBIx-ScopedTransaction rpm package:
      # sudo apt-get install perl-DBIx-ScopedTransaction


    • /usr/share/doc/perl-DBIx-ScopedTransaction-1.2.0/Changes
    • /usr/share/doc/perl-DBIx-ScopedTransaction-1.2.0/LICENSE
    • /usr/share/doc/perl-DBIx-ScopedTransaction-1.2.0/
    • /usr/share/doc/perl-DBIx-ScopedTransaction-1.2.0/ignore.txt
    • /usr/share/doc/perl-DBIx-ScopedTransaction-1.2.0/examples/examples.txt
    • /usr/share/perl5/DBIx/