All pastes #58367 Raw Edit

Someone

public text v1 · immutable
#58367 ·published 2006-05-23 14:10 UTC
rendered paste body
package DBE::App1::Controller::People;
use base Catalyst::Example::Controller::InstantCRUD;
use strict;

use Carp;

# Extending base class here
sub auto : Local {
    my ( $self, $c ) = @_;

        $self->NEXT::auto( $c );

        # MODIFICATION -- Added database transaction log
        #
        $|++; # turn off buffer
        my $transx_log_file = $c->path_to('db/transx_log_file');
        $c->log->debug("transx_log_file = $transx_log_file ");
        our $fh = IO::File->new(">>$transx_log_file") || croak "Cannot open $transx_log_file";
        $c->model( 'DBICSchemamodel' )->storage->debugfh($fh);
        $c->model( 'DBICSchemamodel' )->storage->debug(1);

    1;
}