my $data = slurp($file);
my $asn_output = $parser->decode( $data )
- or die "No ". $asn_format->{'macro'}. " found\n";
+ or return "No ". $asn_format->{'macro'}. " found\n";
$asn_header_buffer = &{ $asn_format->{'header_buffer'} }( $asn_output );
last unless scalar(@buffer);
my $row = shift @buffer;
+ &{ $asn_format->{row_callback} }( $row, $asn_header_buffer )
+ if $asn_format->{row_callback};
foreach my $key ( keys %{ $asn_format->{map} } ) {
$hash{$key} = &{ $asn_format->{map}{$key} }( $row, $asn_header_buffer );
}
return "Empty file!";
}
- $dbh->commit or die $dbh->errstr if $oldAutoCommit;;
+ $dbh->commit or die $dbh->errstr if $oldAutoCommit;
''; #no error