]> git.donarmstrong.com Git - reference.git/blobdiff - lib/Reference/Retrieve/PubMed.pm
just use Dumper to dump the publication type instead of guessing
[reference.git] / lib / Reference / Retrieve / PubMed.pm
index 553245d6ddc60ec3a30857db74662f5d558a466e..1fc4dff76d4d0582086a8e930b34763c11d8df48 100644 (file)
@@ -189,9 +189,7 @@ sub _create_reference_from_xml($$){
          }
      }
      if (not defined $ref_type) {
-         warn "Unsupported PublicationType: ".(ref($ref->{MedlineCitation}->{Article}->{PublicationTypeList}->{PublicationType})?
-                                               join(',',@{$ref->{MedlineCitation}->{Article}->{PublicationTypeList}->{PublicationType}}):
-                                               $ref->{MedlineCitation}->{Article}->{PublicationTypeList}->{PublicationType});
+         warn "Unsupported PublicationType: ".Dumper($ref->{MedlineCitation}->{Article}->{PublicationTypeList}->{PublicationType});
          print STDERR Dumper($ref) if $DEBUG;
          $ref_type = 'article';
      }
@@ -257,6 +255,8 @@ sub _fix_medline_abstract{
             $ret .= $element->{Label}.': '.$element->{content};
         }
         return $ret;
+    } elsif (ref($abstract) and ref($abstract) eq 'HASH') {
+        return $abstract->{Label}.': '.$abstract->{content};
     } else {
         return $abstract;
     }