]> git.donarmstrong.com Git - bin.git/commitdiff
fix how ids is handled; the documentation is completely wrong
authorDon Armstrong <don@donarmstrong.com>
Tue, 14 Jan 2014 20:42:32 +0000 (12:42 -0800)
committerDon Armstrong <don@donarmstrong.com>
Tue, 14 Jan 2014 20:42:32 +0000 (12:42 -0800)
pubmed_search

index cc90661e363918f5a1e6cb3a5e8dffd78da9323e..6dff865533161e8f40eadd9daed9d1fc5b755d68 100755 (executable)
@@ -92,6 +92,9 @@ my $result = $fac->esearch(-email => 'don@donarmstrong.com',
                            -retmax => 1000,
                           )->run();
 my @ids = $result->ids;
+if (@ids > 0 and ref($ids[0])) {
+    @ids = @{$ids[0]};
+}
 if ($options{org_mode}) {
     print "* Pubmed search results for ".join(' ',@ARGV)." (".scalar(@ids).")\n";
     print "  + ";