r817@llin: dpavlin | 2006-07-07 23:48:50 +0200
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 7 Jul 2006 21:48:09 +0000 (21:48 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 7 Jul 2006 21:48:09 +0000 (21:48 +0000)
 support repeatable subfields from Biblio::Isis 0.20

git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@589 07558da8-63fa-0310-ba24-9fe276d99e06

Makefile.PL
lib/WebPAC/Normalize.pm

index 1a24a2b..b85e1e8 100644 (file)
@@ -24,7 +24,7 @@ WriteMakefile(
        'Encode' => 0,
        'LWP' => 0,
        'File::Path' => 0,
-       'Biblio::Isis' => 0.13,
+       'Biblio::Isis' => 0.20,
        'MARC::Fast' => 0.02,
        'Search::Estraier' => 0.06,
        'List::Util' => 0,
index 67d397b..37acd66 100644 (file)
@@ -35,11 +35,11 @@ WebPAC::Normalize - describe normalisaton rules using sets
 
 =head1 VERSION
 
-Version 0.11
+Version 0.12
 
 =cut
 
-our $VERSION = '0.11';
+our $VERSION = '0.12';
 
 =head1 SYNOPSIS
 
@@ -649,7 +649,13 @@ sub rec2 {
        my $f = shift;
        return unless (defined($rec && $rec->{$f}));
        my $sf = shift;
-       return map { $_->{$sf} } grep { ref($_) eq 'HASH' && $_->{$sf} } @{ $rec->{$f} };
+       return map {
+               if (ref($_->{$sf}) eq 'ARRAY') {
+                       @{ $_->{$sf} };
+               } else {
+                       $_->{$sf};
+               }
+       } grep { ref($_) eq 'HASH' && $_->{$sf} } @{ $rec->{$f} };
 }
 
 =head2 rec