Changeset 37185


Ignore:
Timestamp:
2023-01-25T23:31:32+13:00 (15 months ago)
Author:
davidb
Message:

Fixed issue with how metadata_exp was coded

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-installations/whakatohea-dl/trunk/sites/wmtb/collect/tipple-waiata/perllib/plugins/TippleExportJSONPlugin.pm

    r37183 r37185  
    6161      'type' => "string",
    6262      'deft' => "WAIATA",
    63       'deft' => "",
     63#      'deft' => "",
    6464      'reqd' => "no" },   
    6565];
     
    101101    my $self = new SplitJSONFile($pluginlist, $inputargs, $hashArgOptLists);
    102102
    103     my $blessed_self = bless $self, $class;
    104 
    105103    my $metadata_exp = $self->{'metadata_exp'};
    106104    my @metadata_exps = split(/\s*,\s*/,$metadata_exp);
    107105
    108106    $self->{'metadata_exp_lookup'} = {};
     107   
    109108    foreach my $md_exp_and_opt_mapping (@metadata_exps) {
    110     my ($md_exp,$opt_mapping) = ($md_exp_and_opt_mapping =~ m/^(.+?)(?:->(.+))$/);
    111     $blessed_self->{'metadata_exp_lookup'}->{$md_exp} = { 'exists' => 1, 'gs_metadata_name' => $opt_mapping }; # note: $opt_mapping might be undef
    112     }
    113    
    114     return $blessed_self;
     109    print STDERR "**** md_ext_and_opt_mapping = $md_exp_and_opt_mapping\n";
     110   
     111    my ($md_exp,$opt_mapping) = ($md_exp_and_opt_mapping =~ m/^(.+?)(?:->(.+))?$/);
     112    $self->{'metadata_exp_lookup'}->{$md_exp} = { 'exists' => 1, 'gs_metadata_name' => $opt_mapping }; # note: $opt_mapping might be undef
     113    }
     114
     115    return bless $self, $class;
    115116}
    116117
Note: See TracChangeset for help on using the changeset viewer.