The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Catmandu::Fix::Condition::pica_match - Conditionals on PICA fields

SYNOPSIS

   # pica_match(PICA_PATH,REGEX)
   
   if pica_match('021Aa','My funny title')
        add_field('my.funny.title','true')
   end

   # pica_match(PICA_PATH)
   # checks whether a field exists
   
   # pica_match($9)
   # checks whether a subfield exists

   if pica_match('001U0')
        add_field('my.encode_info','true')
   end

DESCRIPTION

Check whether at least one PICA field or subfield exists or its value matches a regular expression.

SEE ALSO

Catmandu::Fix::pica_map