Changeset 8646


Ignore:
Timestamp:
2004-11-24T11:15:00+13:00 (19 years ago)
Author:
mdewsnip
Message:

Made ISISPlug.pm a bit more robust to crap files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/ISISPlug.pm

    r8563 r8646  
    171171    # Process each line of the ISIS record, one at a time
    172172    foreach $line (split(/\n/, $$textref)) {
    173     $line =~ /^tag=(.+) data=(.+)$/;
     173    $line =~ /^tag=(.*) data=(.+)$/;
    174174    my $rawtagname = $1;
    175175    my $rawtagdata = $2;
    176     # print "Raw tag: $rawtagname, Raw data: $rawtagdata\n";
     176    # print STDERR "Raw tag: $rawtagname, Raw data: $rawtagdata\n";
     177    next if ($rawtagname eq "");
    177178
    178179    # Metadata field names: title case, then remove spaces
     
    196197        # If there is a subfield specifier, parse it off
    197198        my $subfieldname = "";
    198         if ($rawtagvalue =~ s/^\^([a-z])//) {
     199        if ($rawtagvalue =~ s/^\^// && $rawtagvalue =~ s/([a-z])//) {
    199200            $subfieldname = "^$1";
    200201        }
Note: See TracChangeset for help on using the changeset viewer.