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->SUPER::auto( $self, $c ); # MODIFICATION -- Added database transaction log # $|++; # turn off buffer my $name = $c->config('name'); my $transx_log_filename = "${name}_transx_log_file"; my $transx_log_file = $c->path_to('root') . "/../db/$transx_log_filename"; $c->log->debug("Appending $transx_log_file 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; }