[ic] Error correction in DBI.pm

David Etheredge David_e at charter.net
Mon Feb 3 03:52:52 UTC 2014


In trying to debug the problem with my db files, I found what may be an 
error in DBI.pm.


sub open_table {

my ($class, $config, $tablename) = @_;

$config->{PRINTERROR} = 0 if ! defined $config->{PRINTERROR};

$config->{RAISEERROR} = 1 if ! defined $config->{RAISEERROR};

my @call;

#::logDebug("opening table class=$class tablename=$tablename config=" . 
::uneval($config) . " [email protected]"); #<<<<<Line does not work properly here 
because @call has not been determined you.

my $dattr;

my $db;

DOCONNECT: {

@call = find_dsn($config);

$dattr = pop @call;

::logDebug("opening table class=$class tablename=$tablename config=" . 
::uneval($config) . " [email protected]"); #<<<<<<< correct information is reported 
when the line is moved to here.

if (! $config->{AUTO_SEQUENCE} and ! defined $config->{AutoNumberCounter}) {

eval {

$config->{AutoNumberCounter} = new Vend::CounterFile

$config->{AUTO_NUMBER_FILE},

$config->{AUTO_NUMBER} || '00001',

$config->{AUTO_NUMBER_DATE};

};

if([email protected]) {

::logError("Cannot create AutoNumberCounter: %s", [email protected]);

::logDebug("Cannot create AutoNumberCounter: %s", [email protected]);

$config->{AutoNumberCounter} = '';

}

}

unless ($config->{dsn_id}) {

$config->{dsn_id} = join "_", grep ! ref($_), @call;

$config->{dsn_id} .= "_transact" if $config->{Transactions};

}




More information about the interchange-users mailing list