handle single ISSN
authorDon Armstrong <don@donarmstrong.com>
Fri, 2 Dec 2016 16:59:21 +0000 (08:59 -0800)
committerDon Armstrong <don@donarmstrong.com>
Fri, 2 Dec 2016 16:59:21 +0000 (08:59 -0800)
lib/Reference/Retrieve/PubMed.pm

index 0ecc842..d1de4e9 100644 (file)
@@ -362,6 +362,9 @@ sub _fix_medline_journal($$$;){
               $journal{lc($2)} = $3;
          }
   }
+     if (ref $ref->{JrXml}{Serial}{ISSN} ne 'ARRAY') {
+         $ref->{JrXml}{Serial}{ISSN} = [$ref->{JrXml}{Serial}{ISSN}];
+     }
      my $print_issn = $ref->{JrXml}{Serial}{ISSN}[0]{IssnType} eq 'Print' ? 0 : 1;
      my @journal_entry =
          (title       => $ref->{JrXml}{Serial}{Title},