Catalyst::Plugin::ErrorCatcher::Plugin::CleanUp::TxnDo - Catalyst::Plugin::ErrorCatcher::Plugin::CleanUp::TxnDo documentation


Catalyst-Plugin-ErrorCatcher documentation Contained in the Catalyst-Plugin-ErrorCatcher distribution.

Index


Code Index:

NAME

Top

Catalyst::Plugin::ErrorCatcher::Plugin::CleanUp::TxnDo

VERSION

Top

version 0.0.8.8

AUTHOR

Top

Chisel Wright <chisel@chizography.net>

COPYRIGHT AND LICENSE

Top


Catalyst-Plugin-ErrorCatcher documentation Contained in the Catalyst-Plugin-ErrorCatcher distribution.

package Catalyst::Plugin::ErrorCatcher::Plugin::CleanUp::TxnDo;
BEGIN {
  $Catalyst::Plugin::ErrorCatcher::Plugin::CleanUp::TxnDo::VERSION = '0.0.8.8';
}
BEGIN {
  $Catalyst::Plugin::ErrorCatcher::Plugin::CleanUp::TxnDo::DIST = 'Catalyst-Plugin-ErrorCatcher';
}
use strict;
use warnings;

sub tidy_message {
    my $plugin      = shift;
    my $errstr_ref  = shift;

    # DBIx::Class::Schema::txn_do(): ... ... line XX
    ${$errstr_ref} =~ s{
                DBIx::Class::Schema::txn_do\(\):
                \s+
                (.+?)
                \s+at\s+
                \S+
                \s+
                line
                \s+
                .*
                $
        }{$1}xmsg;

    $errstr_ref;
}

1;

__END__