projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added new html
[spider.git]
/
perl
/
DXLogPrint.pm
diff --git
a/perl/DXLogPrint.pm
b/perl/DXLogPrint.pm
index 8a12b05c2791aa3f137fc13ce4f821f1dde5e528..9c5633e1fbf2d3bb085d8eeec62c4bf267ebd3b5 100644
(file)
--- a/
perl/DXLogPrint.pm
+++ b/
perl/DXLogPrint.pm
@@
-50,7
+50,7
@@
sub print
\$count++;
next if \$count < $from;
push \@out, print_item(\$ref);
\$count++;
next if \$count < $from;
push \@out, print_item(\$ref);
- last
LOOP
if \$count >= \$to; # stop after n
+ last if \$count >= \$to; # stop after n
}
}
);
}
}
);
@@
-58,8
+58,7
@@
sub print
$self->close; # close any open files
my $fh = $self->open(@date);
$self->close; # close any open files
my $fh = $self->open(@date);
-LOOP:
- while ($count < $to) {
+ for ($count = 0; $count < $to; ) {
my @spots = ();
if ($fh) {
while (<$fh>) {
my @spots = ();
if ($fh) {
while (<$fh>) {
@@
-67,13
+66,14
@@
LOOP:
push @in, [ split '\^' ];
}
eval $eval; # do the search on this file
push @in, [ split '\^' ];
}
eval $eval; # do the search on this file
- return ("Spot search error", $@) if $@;
+ last if $count >= $to; # stop after n
+ return ("Log search error", $@) if $@;
}
$fh = $self->openprev(); # get the next file
last if !$fh;
}
}
$fh = $self->openprev(); # get the next file
last if !$fh;
}
-
- return @out;
+
+ return @out
if defined @out
;
}
#
}
#