From 20c3d0425f0038b12e949102462c105e7c3b9066 Mon Sep 17 00:00:00 2001 From: djfiander Date: Tue, 20 Jan 2009 01:42:41 +0000 Subject: [PATCH] subfield 'y' (regularity pattern) is repeatable. Need to keep all of them. git-svn-id: svn://svn.open-ils.org/ILS/trunk@11881 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Utils/MFHD/Caption.pm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Utils/MFHD/Caption.pm b/Open-ILS/src/perlmods/OpenILS/Utils/MFHD/Caption.pm index 5b4561d437..b2f52bc584 100755 --- a/Open-ILS/src/perlmods/OpenILS/Utils/MFHD/Caption.pm +++ b/Open-ILS/src/perlmods/OpenILS/Utils/MFHD/Caption.pm @@ -47,9 +47,13 @@ sub new 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 @@ sub new } 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; -- 2.11.0