MARC::...bfield(3pm)
β¨ NAME β¨
okay bestie, first things first β this is the manual page for MARC::Spec::Subfield, and it's a subfield specification π
. You pulled this up from the User Contributed Perl Documentation (the page header says MARC::...bfield(3pm), iykyk, the name just got truncated and honestly relatable π).
π¦ SYNOPSIS π¦
the vibe check, in code:
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
no cap, that's the whole flex π₯
π DESCRIPTION π
MARC::Spec::Subfield is the subfield specification of a MARC::Spec. it's giving very specific, very structured, very much the main character of a subfield π
for the full tea on the syntax, go read MARCspec - A common MARC record path language at http://marcspec.github.io/MARCspec/ β that's the source of truth, bestie.
π METHODS π
some methods are inherited from MARC::Spec::Structure β so when you see them here, just know they're visiting from the family, periodt π«Ά
πΈ new
Create a new MARC::Spec::Subfield instance. brand new, fresh out the box, slay β¨
πΈ add_subspec(MARC::Spec::Subspec)
Appends a subspec to the array of the attribute subspecs. The 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. The parameter must be an ArrayRef, and every element must be an instance of MARC::Spec::Subspec.
Inherited from MARC::Spec::Structure.
πΈ to_string
Returns the spec as a string. it's literally the spec, but stringified π
Inherited from MARC::Spec::Structure.
π§ PREDICATES π§
some predicates are inherited from MARC::Spec::Structure β we love a shared inheritance moment π
π¦ 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.
π ATTRIBUTES π
some attributes are inherited from MARC::Spec::Structure β iconic behaviour honestly π«
π 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 positive integer or the character '#'. Default is 0.
π index_end
Obligatory. The ending index of subfield repetitions. Maybe a positive 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 β and that means 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, which means 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.
ok this one is the whole plot twist, read it twice bestie π
π«Ά AUTHOR π«Ά
Carsten Klee "<klee at cpan.org>"
πΈ CONTRIBUTORS πΈ
- Johann Rolschewski,
"<jorol at cpan>"
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2016 by Carsten Klee.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
π BUGS π
Please report any bugs to https://github.com/MARCspec/MARC-Spec/issues β they're not gonna bite, fr fr π
π SEE ALSO π
MARC::SpecMARC::Spec::FieldMARC::Spec::IndicatorMARC::Spec::SubspecMARC::Spec::StructureMARC::Spec::ComparisonstringMARC::Spec::Parser
and that's the page, bestie π¦π go forth and spec your subfields, you absolute icon π
sign-off: this was perl v5.34.0, dated 2022-06-15 β love that for us, no notes π
β¨
π¦ where this page comes from
- debian bookworm: libmarc-spec-perl 2.0.3-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmarc-spec-perl 2.0.3-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmarc-spec-perl 2.0.3-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmarc-spec-perl 2.0.3-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmarc-spec-perl 2.0.3-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms