Bug 6908 - increase DEBUG level for *NOISY* Dates.pm init() messages github/bug_6908 origin/new/bug_6908
authorMason James <mtj@kohaaloha.com>
Thu, 22 Sep 2011 09:48:04 +0000 (21:48 +1200)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 6 Dec 2011 19:38:08 +0000 (20:38 +0100)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
C4/Dates.pm

index 335de1c..8b29264 100644 (file)
@@ -167,7 +167,7 @@ sub init ($;$$) {
     $self->{'dateformat'} = $dformat = ( scalar(@_) >= 2 ) ? $_[1] : _prefformat();
     ( $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 warn "(during init) \@\$self->{'dmy_arrayref'}: " . join( ' ', @{ $self->{'dmy_arrayref'} } ) . "\n";
+    if ($debug > 1) { warn "(during init) \@\$self->{'dmy_arrayref'}: " . join( ' ', @{ $self->{'dmy_arrayref'} } ) . "\n"; }
     return $self;
 }