MARC::...dicator(3pm)
π MARC::Spec::Indicator β the vibe check π
okay so bestie, welcome to the User Contributed Perl Documentation corner of the terminal, this is the MARC::Spec::Indicator(3pm) page and it's lowkey iconic, let me tell you everything β¨
πΈ NAME πΈ
MARC::Spec::Indicator β it's the indicator specification bestie. that's the whole name, that's the whole job π
β¨ SYNOPSIS β¨
like, here's the actual moment, the main character energy:
use MARC::Spec::Indicator;
my $indicator = MARC::Spec::Indicator->new('2');
say ref $indicator; # MARC::Spec::Indicator
say $field->position; # 2
see how clean that is?? ref says MARC::Spec::Indicator and position says 2. slay π
π¦ DESCRIPTION π¦
MARC::Spec::Indicator is the indicator specification of a MARC::Spec. no cap, that's literally what it is.
if you wanna go deeper on the syntax (and honestly, why wouldn't you), go look at MARCspec - A common MARC record path language over at http://marcspec.github.io/MARCspec/ β all the further details live there, iykyk π
π METHODS π
π« new(Str)
Creates a brand new MARC::Spec::Indicator instance, fresh out the box β¨
the parameter MUST be a valid MARCspec indicatorPosition. not optional, not vibes-based, it has to be valid fr fr.
π« add_subspec(MARC::Spec::Subspec)
Appends a subspec to the array of the attribute subspecs.
parameter MUST be an instance of MARC::Spec::Subspec. periodt.
π« add_subspecs(ArrayRef[MARC::Spec::Subspec])
Appends subspecs (plural!! we're doing a whole group chat of them π«Ά) to the array of the attribute subspecs.
the parameter MUST be anArrayRef, and every element MUST be an instance ofMARC::Spec::Subspec. yes every single one, don't try it.
π« to_string
Returns the spec as a string. that's it. that's the whole method π
π PREDICATES π
π« has_position
True if the attribute position has a value, false otherwise. classic yes/no moment.
π« has_subspecs
Returns true if the attribute subspecs has a value and false otherwise. same energy, different attribute.
π ATTRIBUTES π
heads up bestie β some attributes are inherited from MARC::Spec::Structure, so don't come for them, they're doing their best π
π« base
Obligatory. Scalar. The base Field spec without subspecs. it's giving foundation, it's giving bare minimum but make it required.
π« position
Obligatory. The indicator position. that's the whole description, she's simple, she's essential β
π« subspecs
Optional. okay this one's a whole situation, stay with me:
- An array of instances of
MARC::Spec::Subspecβ and so, 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β and so, all subspecs in this AoA MUST be validated as a combination with the boolean'OR'.
so like, 'AND' for the flat array, 'OR' for the array-of-arrays. both? both. neither? also allowed, she's optional π
also go read MARC::Spec::Subspec for the description of the attributes of MARC::Spec::Subspec, because I'm not doing that job for them, that's their page π¦
π AUTHOR π
Carsten Klee "<klee at cpan.org>" β absolute legend, we stan π
πΈ CONTRIBUTORS πΈ
- Johann Rolschewski,
"<jorol at cpan>"β thank you for your service bestie π«Ά
π 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. iconic behavior, truly π
π BUGS π
Please report any bugs to https://github.com/MARCspec/MARC-Spec/issues β don't suffer in silence, drop it in the issues, we'll figure it out together π
π SEE ALSO π
MARC::SpecMARC::Spec::FieldMARC::Spec::SubfieldMARC::Spec::SubspecMARC::Spec::StructureMARC::Spec::ComparisonstringMARC::Spec::Parser
the whole friend group, the whole squad, go say hi to all of them πβ¨π
and that's the page bestie!! π this was perl v5.34.0, dated 2022-06-15, living under the MARC::...dicator(3pm) name in the User Contributed Perl Documentation, and honestly? she ate. no cap. bye bestie, go validate those indicators π
ππ¦
π¦ 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