MARC::...ructure(3pm)
π MARC::Spec::Structure π
okay bestie, gather round, because this is MARC::Spec::Structure from the User Contributed Perl Documentation and it's literally the blueprint of the whole MARCspec situation. she's the base class, the mother, the blueprint, the moment. β¨
πΈ NAME πΈ
MARC::Spec::Structure β base class. that's it, that's the whole name, and honestly? iconic of her. π
π¦ SYNOPSIS π¦
okay so here's the vibe in actual code, no cap:
use MARC::Spec::Field;
# create a new field
my $field = MARC::Spec::Field->new('246');
# field does inherit all attributes, predicates and methods
say $field->DOES('MARC::Spec::Structure'); # 1
the way that <pink>$field</pink> just inherits everything β all the attributes, all the predicates, all the methods β and then DOES('MARC::Spec::Structure') returns <green>1 because yes queen, she IS one. π
π DESCRIPTION π
she's the base class for <pink>MARC::Spec::Field</pink> and <pink>MARC::Spec::Subfield` β those two are her daughters and they get everything she has. π«Ά
β¨ METHODS β¨
π set_index_start_end (Str)
sets <lavender>MARC::Spec::Structure::$index_start</lavender> and <lavender>MARC::Spec::Structure::$index_end</lavender> from an index position or range. hand her a Str, she handles the rest. β
π set_char_start_end (Str)
sets <lavender>MARC::Spec::Structure::$char_start</lavender> and <lavender>MARC::Spec::Structure::$char_end</lavender> from an character position or range. same energy, different attribute pair. π
π add_subspec(MARC::Spec::Subspec)
appends a subspec to the array of the attribute subspecs. the parameter must be an instance of <pink>MARC::Spec::Subspec</pink> β no randos allowed, she has standards. π
π add_subspecs(ArrayRef[MARC::Spec::Subspec])
appends subspecs to the array of the attribute subspecs. the parameter must be an ArrayRef and every single element must be an instance of <pink>MARC::Spec::Subspec</pink>. bulk mode, but still no randos. π₯
π PREDICATES π
these are the little yes/no girlies. true or false, that's the whole job.
has_char_startβ true if attributechar_starthas an value and false otherwise.has_char_endβ true if attributechar_endhas an value and false otherwise.has_char_posβ true if attributechar_poshas an value and false otherwise.has_subspecsβ returns true if attributesubspecshas an value and false otherwise.
π ATTRIBUTES π
the whole personality lives here, fr fr.
π base
Obligatory. Scalar. Normalized MARCspec without Subspecs. she doesn't show up optional, okay, she's required. β¨
π 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 <lavender>MARC::Spec::Structure::$char_start</lavender> is defined. so like, no char_start, no char_end, them's the rules. π
π char_length
the difference of <lavender>MARC::Spec::Structure::$char_start</lavender> and <lavender>MARC::Spec::Structure::$char_end</lavender> if both are numeric (or else -1). Only present if <lavender>MARC::Spec::Structure::$char_start</lavender> is defined.
π char_pos
if defined, the character position or range. Only present if <lavender>MARC::Spec::Structure::$char_start</lavender> is defined.
π index_start
Obligatory. The beginning index of field repetitions. Maybe a positiv integer or the character '#'. Default is 0.
π index_end
Obligatory. The ending index of field repetitions. Maybe a positiv integer or the character '#'. Default is '#'.
π index_length
Obligatory. The difference of <lavender>MARC::Spec::Structure::$index_start</lavender> and <lavender>MARC::Spec::Structure::$index_end</lavender> if both are numeric. Default is -1.
π AUTHOR π
Carsten Klee <klee at cpan.org> β the founder, the visionary, the main character. π
π§ 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. free as in go off, bestie. ποΈ
π BUGS π
Please report any bugs to <https://github.com/MARCspec/MARC-Spec/issues>
not me begging you to file an issue instead of suffering in silence. please. the maintainers want to know. π«Ά
π₯ SEE ALSO π₯
MARC::SpecMARC::Spec::FieldMARC::Spec::SubfieldMARC::Spec::IndicatorMARC::Spec::SubspecMARC::Spec::ComparisonstringMARC::Spec::Parser
and that's the whole page, periodt. π this one's hanging out with perl v5.34.0 and it was dated 2022-06-15, so yeah β vintage, but still serving looks. slay, bye. πβ¨
π¦ 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