MARC::...::Field(3pm)
π MARC::Spec::Field β field specification π
okay so bestie, welcome to MARC::Spec::Field, a little gem from the User Contributed Perl Documentation corner of the Perl universe. it's giving MARC::Spec::Field in the manual pages, and honestly? it's a whole vibe. sit down, grab a boba, and let's get into it π§β¨
πΈ NAME πΈ
MARC::Spec::Field β field specification. that's it. that's the name. short, sweet, iconic π
β¨ SYNOPSIS β¨
here's the tea, literally:
use MARC::Spec::Field;
my $field = MARC::Spec::Field->new('246');
say ref $field; # MARC::Spec::Field
say $field->tag; # 246
say $field->index_start; # 0
say $field->index_end; # '#'
look at her go. she's constructing, she's reporting her tag, she's showing off her index_start and index_end. main character energy fr fr π
π¦ DESCRIPTION π¦
MARC::Spec::Field is the field specification of a MARC::Spec. that's the whole job. she's a field spec and she knows it.
if you wanna go deeper on the syntax β and bestie, you know you do β go check out MARCspec - A common MARC record path language at <http://marcspec.github.io/MARCspec/> for all the further details. iykyk π
π METHODS π
heads up: some methods are inherited from MARC::Spec::Structure. so she's not doing all this alone, she's got family π«Ά
new(Str)β creates a brand newMARC::Spec::Fieldinstance. the parameter has to be a valid MARCspec field tag, no exceptions, no shortcuts. give her something real.add_subspec(MARC::Spec::Subspec)β appends a subspec onto the array of the attributesubspecs. the parameter must be an instance ofMARC::Spec::Subspec. like, don't just pass her anything, okay?add_subspecs(ArrayRef[MARC::Spec::Subspec])β appends a whole pile of subspecs to the array of the attributesubspecs. the parameter must be anArrayRefand every element in it must be an instance ofMARC::Spec::Subspec. it's giving "bring the whole group chat" πto_stringβ returns the spec as a string. that's it. she said what she said β¨
β PREDICATES β
also: some predicates are inherited from MARC::Spec::Structure. again, family. we love to see it π₯°
has_char_startβ true if the attributechar_starthas a value, false otherwise.has_char_endβ true if the attributechar_endhas a value, false otherwise.has_char_posβ true if the attributechar_poshas a value, false otherwise.has_subspecsβ returns true if the attributesubspecshas a value, false otherwise.
π ATTRIBUTES π
one more time for the people in the back: some attributes are inherited from MARC::Spec::Structure πΈ
baseβ obligatory. scalar. the base Field spec without subspecs. the bare face, the no-makeup selfie, the raw material.tagβ obligatory. the field tag. iconic, essential, non-negotiable.char_posβ if defined, the character position or range. only present ifMARC::Spec::Field::$char_startis defined. (yes she shows up twice down here, she contains multitudes π)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 ifMARC::Spec::Field::$char_startis defined.char_lengthβ the difference ofMARC::Spec::Field::$char_startandMARC::Spec::Field::$char_endif both are numeric (or else-1). only present ifMARC::Spec::Field::$char_startis defined.char_posβ if defined, the character position or range. only present ifMARC::Spec::Field::$char_startis defined.index_startβ obligatory. the beginning index of field repetitions. maybe a positiv integer or the character#. default is0.index_endβ obligatory. the ending index of field repetitions. maybe a positiv integer or the character#. default is#.index_lengthβ obligatory. the difference ofMARC::Spec::Field::$index_startandMARC::Spec::Field::$index_endif both are numeric. default is-1.subspecsβ optional. an array of instances ofMARC::Spec::Subspecβ and the way that means every subspec in this array MUST be validated as a combination with the boolean'AND'β and/or an array of arrays (AoA) of instances ofMARC::Spec::Subspec, meaning every subspec in this AoA must be validated as a combination with the boolean'OR'.
see MARC::Spec::Subspec for the description of the attributes of MARC::Spec::Subspec π«Ά
π AUTHOR π
Carsten Klee "<klee at cpan.org>" β the legend herself/himself. periodt.
π CONTRIBUTORS π
- Johann Rolschewski,
"<jorol at cpan>"β shoutout, we see you, we appreciate you π
π 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. slay, open source, we love that for us β¨
π BUGS π
please report any bugs to <https://github.com/MARCspec/MARC-Spec/issues> β do NOT suffer in silence bestie, drop it in the issues, the maintainers got you π
π SEE ALSO π
MARC::SpecMARC::Spec::SubfieldMARC::Spec::IndicatorMARC::Spec::SubspecMARC::Spec::StructureMARC::Spec::ComparisonstringMARC::Spec::Parser
the whole squad fr fr π«Ά go read them too, they're all part of the lore.
and that's the page!! this whole thing comes from perl v5.34.0, dated 2022-06-15, and yes it's the MARC::...::Field(3pm) manual. mwah, go forth and spec your fields ππβ¨
π¦ 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