Changeset 10254 for trunk/gsdl/perllib/plugins/ISISPlug.pm
- Timestamp:
- 2005-07-19T16:27:51+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/ISISPlug.pm
r10218 r10254 31 31 use SplitPlug; 32 32 33 use strict; 34 no strict 'refs'; # allow filehandles to be variables and viceversa 33 35 34 36 # ISISPlug is a sub-class of SplitPlug. 35 37 sub BEGIN { 36 @IS A = ('SplitPlug');38 @ISISPlug::ISA = ('SplitPlug'); 37 39 } 38 40 … … 155 157 my $outhandle = $self->{'outhandle'}; 156 158 159 my $cursection = $doc_obj->get_top_section(); 157 160 my $subfield_separator = $self->{'subfield_separator'}; 158 161 my $entry_separator = $self->{'entry_separator'}; … … 164 167 165 168 # Process each line of the ISIS record, one at a time 166 foreach $line (split(/\n/, $$textref)) {169 foreach my $line (split(/\n/, $$textref)) { 167 170 $line =~ /^tag=(.*) data=(.+)$/; 168 171 my $rawtagname = $1; … … 173 176 # Metadata field names: title case, then remove spaces 174 177 my $tagname = ""; 175 foreach $word (split(/\s+/, $rawtagname)) {178 foreach my $word (split(/\s+/, $rawtagname)) { 176 179 substr($word, 0, 1) =~ tr/a-z/A-Z/; 177 180 $tagname .= $word; … … 183 186 # Handle each piece of metadata ('%' separated) 184 187 my $completetagvalue = ""; 185 foreach $rawtagvalue (split(/%/, $rawtagdata)) {188 foreach my $rawtagvalue (split(/%/, $rawtagdata)) { 186 189 $completetagvalue .= $entry_separator unless ($completetagvalue eq ""); 187 190 … … 255 258 256 259 my $amongstdefinitions = 0; 257 foreach $fdtfileline (<FDT_FILE>) {260 foreach my $fdtfileline (<FDT_FILE>) { 258 261 $fdtfileline =~ s/(\s*)$//; # Remove any nasty spaces at the end of the lines 259 262
Note:
See TracChangeset
for help on using the changeset viewer.