Add a simple subfields_list() method to MFHD/Caption.pm to match that in Holding.pm
authordbwells <dbwells@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 8 Dec 2010 19:47:44 +0000 (19:47 +0000)
committerdbwells <dbwells@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 8 Dec 2010 19:47:44 +0000 (19:47 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@18933 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Utils/MFHD/Caption.pm

index 2b5a932..55e6df9 100644 (file)
@@ -725,4 +725,15 @@ sub next {
     return ($next);
 }
 
+# return a simple subfields list
+sub subfields_list {
+    my $self = shift;
+    my @subfields;
+
+    foreach my $subfield ($self->subfields) {
+        push(@subfields, $subfield->[0], $subfield->[1]);
+    }
+    return @subfields;
+}
+
 1;