[open-ils-commits] r11881 - trunk/Open-ILS/src/perlmods/OpenILS/Utils/MFHD
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jan 19 20:42:42 EST 2009
Author: djfiander
Date: 2009-01-19 20:42:41 -0500 (Mon, 19 Jan 2009)
New Revision: 11881
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Utils/MFHD/Caption.pm
Log:
subfield 'y' (regularity pattern) is repeatable. Need to keep all
of them.
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Utils/MFHD/Caption.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Utils/MFHD/Caption.pm 2009-01-20 01:41:47 UTC (rev 11880)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Utils/MFHD/Caption.pm 2009-01-20 01:42:41 UTC (rev 11881)
@@ -47,9 +47,13 @@
carp '$v specified for top-level enumeration'
unless defined($last_enum);
$self->{ENUMS}->{$last_enum}->{RESTART} = ($val eq 'r');
- } elsif ($key =~ /[npw-z]/) {
+ } elsif ($key =~ /[npwxz]/) {
# Publication Pattern ('o' == type of unit, 'q'..'t' undefined)
$self->{PATTERN}->{$key} = $val;
+ } elsif ($key eq 'y') {
+ # Publication pattern: 'y' is repeatable
+ $self->{PATTERN}->{y} = [] if (!defined $self->{PATTERN}->{y});
+ push @{$self->{PATTERN}->{y}}, $val;
} elsif ($key eq 'o') {
# Type of unit
$self->{UNIT} = $val;
@@ -82,9 +86,19 @@
}
bless ($self, $class);
+
+ if (exists $self->{PATTERN}->{y}) {
+ $self->decode_pattern;
+ }
+
return $self;
}
+sub decode_pattern {
+ my $self = shift;
+ my $pattern = $self->{PATTERN}->{y};
+}
+
sub compressible {
my $self = shift;
More information about the open-ils-commits
mailing list