By switching to DBI->selectcol_arrayref in pingest.pl, we can avoid
having to check for references in the main loop. This eliminates an
extra variable and an extra line of code that are no longer needed.
Signed-off-by: Jason Stephenson <jstephenson@mvlcstaff.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
}
} else {
my $dbh = DBI->connect('DBI:Pg:');
- @input = @{$dbh->selectall_arrayref($q)};
+ @input = @{$dbh->selectcol_arrayref($q)};
$dbh->disconnect();
}
-foreach my $r (@input) {
- my $record = (ref($r)) ? $r->[0] : $r;
+foreach my $record (@input) {
push(@blist, $record); # separate list of browse-only ingest
push(@$records, $record);
if (++$count == $batch_size) {