logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

MARC::Spec::Subfield - subfield specification

Attributes

       Some attributes are inherited from MARC::Spec::Structure.

   base
       Obligatory. The base Subfield spec without subspecs.

   code
       Obligatory. The subfield code.

   char_pos
       If defined, the character position or range. Only present if MARC::Spec::Subfield::$char_start is
       defined.

   char_start
       If defined, the beginning character position of a character position or range.

   char_end
       If defined, the ending character position of a character position or range.  Only present if
       MARC::Spec::Subfield::$char_start is defined.

   char_length
       The difference of MARC::Spec::Subfield::$char_start and MARC::Spec::Field::$char_end if both are numeric
       (or else -1).  Only present if MARC::Spec::Subfield::$char_start is defined.

   index_start
       Obligatory. The beginning index of subfield repetitions. Maybe a positiv integer or the character '#'.
       Default is 0.

   index_end
       Obligatory. The ending index of subfield repetitions. Maybe a positiv integer or the character '#'.
       Default is '#'.

   index_length
       Obligatory. The difference of MARC::Spec::Subfield::$index_start and MARC::Spec::Subfield::$index_end if
       both are numeric.  Default is -1.

   subspecs
       Optional an array of instances of MARC::Spec::Subspec, thus all subspecs in this array MUST be validated
       as a combination with the boolean 'AND', and/or an array of arrays (AoA) of instances of
       MARC::Spec::Subspec, thus all subspecs in this AoA must be validated as a combination with the boolean
       'OR'.

       See MARC::Spec::Subspec for description of attributes of MARC::Spec::Subspec.

Author

       Carsten Klee "<klee at cpan.org>"

Bugs

       Please report any bugs to <https://github.com/MARCspec/MARC-Spec/issues>

Contributors

       •   Johann Rolschewski, "<jorol at cpan>"

Description

       MARC::Spec::Subfield is the subfield specification of a MARC::Spec.

       See MARCspec - A common MARC record path language <http://marcspec.github.io/MARCspec/> for further
       details on the syntax.

Methods

       Some methods are inherited from MARC::Spec::Structure.

   new
       Create a new MARC::Spec::Subfield instance.

   add_subspec(MARC::Spec::Subspec)
       Appends a subspec to the array of the attribute subspecs. Parameter must be an instance of
       MARC::Spec::Subspec.

       Inherited from MARC::Spec::Structure.

   add_subspecs(ArrayRef[MARC::Spec::Subspec])
       Appends subspecs to the array of the attribute subspecs. Parameter must be an ArrayRef and elements must
       be instances of MARC::Spec::Subspec.

       Inherited from MARC::Spec::Structure.

   to_string
       Returns the spec as a string.

       Inherited from MARC::Spec::Structure.

Name

       MARC::Spec::Subfield - subfield specification

Predicates

       Some predicates are inherited from MARC::Spec::Structure.

   has_char_start
       True if attribute char_start has an value and false otherwise.

   has_char_end
       True if attribute char_end has an value and false otherwise.

   has_char_pos
       True if attribute char_pos has an value and false otherwise.

   has_subspecs
       Returns true if attribute subspecs has an value and false otherwise.

See Also

       •   MARC::Spec

       •   MARC::Spec::Field

       •   MARC::Spec::Indicator

       •   MARC::Spec::Subspec

       •   MARC::Spec::Structure

       •   MARC::Spec::Comparisonstring

       •   MARC::Spec::Parser

perl v5.34.0                                       2022-06-15                          MARC::Spec::Subfield(3pm)

Synopsis

           use MARC::Spec;

           my $ms = MARC::Spec->new('245$a/0-2);
           say ref $ms->subfields;                     # ARRAY
           say ref $ms->subfields->[0];                # MARC::Spec::Subfield

See Also