X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXLog.pm;h=2a2e9078d7f9cf2a1883aee172f4b45c421b02ae;hb=e138c085871ca52cc4a7143b68d8491999f6a366;hp=22f8c808307ce3b4b3fe61f8ce0b6a70a502dd29;hpb=dbf7523a9b228dbdf1d03109afde351b8b194fab;p=spider.git diff --git a/perl/DXLog.pm b/perl/DXLog.pm index 22f8c808..2a2e9078 100644 --- a/perl/DXLog.pm +++ b/perl/DXLog.pm @@ -39,10 +39,7 @@ use Carp; use strict; use vars qw($VERSION $BRANCH); -$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); -$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0)); -$main::build += $VERSION; -$main::branch += $BRANCH; +main::mkver($VERSION = q$Revision$) if main->can('mkver'); use vars qw($log); @@ -99,7 +96,7 @@ sub open $fh->autoflush(1) if $mode ne 'r'; # make it autoflushing if writable $self->{fh} = $fh; -# DXDebug::dbg("opening $self->{fn}\n") if isdbg("dxlog"); +# print "opening $self->{fn}\n"; return $self->{fh}; } @@ -155,7 +152,7 @@ sub write($$$) if (!$self->{fh} || $self->{mode} ne ">>" || $jdate->year != $self->{jdate}->year || - $jdate->thing != $self->{jdate}->year) { + $jdate->thing != $self->{jdate}->thing) { $self->open($jdate, ">>") or confess "can't open $self->{fn} $!"; }