All pastes #58364 Raw Edit

Something

public text v1 · immutable
#58364 ·published 2006-05-23 13:56 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('root') . "/../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;
}