using Warn and not print for debugging purpose
authorHenri-Damien LAURENT <henridamien@koha-fr.org>
Sun, 10 Feb 2008 07:41:50 +0000 (01:41 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Mon, 11 Feb 2008 12:10:01 +0000 (06:10 -0600)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Dates.pm
C4/Members.pm

index 061cc98..f10582b 100644 (file)
@@ -120,7 +120,7 @@ sub init ($;$$) {
        ($format_map{$dformat}) or croak 
                "Invalid date format '$dformat' from " . ((scalar(@_) >= 2) ? 'argument' : 'system preferences');
        $self->{'dmy_arrayref'} = [((@_) ? $self->dmy_map(shift) : localtime )] ;
-       $debug and print STDERR "(during init) \@\$self->{'dmy_arrayref'}: " . join(' ',@{$self->{'dmy_arrayref'}}) . "\n";
+       $debug and warn "(during init) \@\$self->{'dmy_arrayref'}: " . join(' ',@{$self->{'dmy_arrayref'}}) . "\n";
        return $self;
 }
 sub output ($;$) {
index 6accd17..7a9da97 100644 (file)
@@ -547,7 +547,7 @@ sub GetMemberIssuesAndFines {
       "Select count(*) from issues where borrowernumber='$borrowernumber' and
     returndate is NULL";
 
-    $debug and print $query, "\n";
+    $debug and warn $query."\n";
     my $sth = $dbh->prepare($query);
     $sth->execute;
     my $data = $sth->fetchrow_hashref;