mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-31 18:46:02 +00:00
All debug output goes to STDERR so not combined with test results
This commit is contained in:
parent
86cb62f404
commit
995fe296c4
@ -262,7 +262,8 @@ else {
|
||||
if ( defined($url) ) {
|
||||
push @arguments, $url;
|
||||
|
||||
print STDERR join " ", "curl", @arguments, "\n" if ( $debug );
|
||||
warn join " ", "curl", @arguments, "\n"
|
||||
if $debug;
|
||||
|
||||
open RESULTS, "-|", "curl", @arguments;
|
||||
while( <RESULTS> ) {
|
||||
@ -290,7 +291,9 @@ if ( defined($script) ) {
|
||||
if ( defined($queries) && @{$queries} ) {
|
||||
opendb() unless defined($dbh);
|
||||
print "\n";
|
||||
print STDERR "Processing special queries\n" if ( $debug );
|
||||
warn "Processing special queries\n"
|
||||
if $debug;
|
||||
|
||||
foreach $sql_statement ( @$queries ) {
|
||||
# run SQL statement and dump results, into array of hashes
|
||||
my $results = $dbh->selectall_arrayref($sql_statement, { Slice => {} } );
|
||||
@ -299,7 +302,8 @@ if ( defined($queries) && @{$queries} ) {
|
||||
next;
|
||||
}
|
||||
foreach my $row ( @$results ) {
|
||||
print "Query result ================================================\n" if ( $debug );
|
||||
warn "Query result ================================================\n"
|
||||
if $debug;
|
||||
my $sep = "";
|
||||
foreach my $name ( sort keys %$row ) {
|
||||
my $value = $row->{$name};
|
||||
@ -349,7 +353,10 @@ sub get_sql_value {
|
||||
print $dbh->errstr, "\n";
|
||||
return;
|
||||
}
|
||||
print STDERR "RESULT for $varname is ", $results->[0][0], "\n" if ( $debug );
|
||||
|
||||
warn "RESULT for $varname is ", $results->[0][0], "\n"
|
||||
if $debug;
|
||||
|
||||
$values->{$varname} = (defined($results->[0][0]) ? $results->[0][0] : "");
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user