Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
barbie committed Nov 12, 2012
1 parent d9cc15d commit 82cd5de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/cpanstats-sqlite
Expand Up @@ -90,8 +90,8 @@ if($options{id} || $options{file}) {
my @rows = $options{LITESTATS}->get_query('array',$SQL{SelectMax}); my @rows = $options{LITESTATS}->get_query('array',$SQL{SelectMax});
my $id = @rows ? $rows[0]->[0] : 0; my $id = @rows ? $rows[0]->[0] : 0;
my $next = $options{CPANSTATS}->iterator('array',$SQL{SelectNew},$id); my $next = $options{CPANSTATS}->iterator('array',$SQL{SelectNew},$id);
while($row = $next->()) { while(my $row = $next->()) {
$options{LITESTATS}->do_query($SQL{Insert},@$row}); $options{LITESTATS}->do_query($SQL{Insert},@$row);
} }


} }
Expand All @@ -114,7 +114,7 @@ sub get_list {
while(<$fh>) { while(<$fh>) {
next if(/^\s*$/); # ignore empty lines next if(/^\s*$/); # ignore empty lines
s/\s+$//; s/\s+$//;
push @list, {id=>$id} if($id); push @list, {id=>$_} if($_);
} }
$fh->close; $fh->close;


Expand Down

0 comments on commit 82cd5de

Please sign in to comment.