MARC::...Subspec(3pm)
π NAME π
MARC::Spec::Subspec β it's giving subspec specification, bestie β¨
So like, this is the MARC::Spec::Subspec page from the User Contributed Perl Documentation (yes we're in 3pm territory, the Perl module corner of the manual, iykyk).
πΈ SYNOPSIS πΈ
okay so here's the whole vibe in code, no cap:
use MARC::Spec;
use MARC::Spec::Subspec;
use MARC::Spec::Comparisonstring;
# create an empty subspec
my $subspec = MARC::Spec::Subspec->new;
# create the subterms
my $ms = MARC::Spec::parse('245$a')';
my $cmp = MARC::Spec::Comparisonstring->new('Perl');
# add subterms to subspec
$subspec->left($ms);
$subspec->right($cmp);
$subspec->operator('=');
say $subspec->subterms; # '245$a=\Perl'
literally building a little subspec from scratch and then saying it back out. main character energy fr fr π
π¦ DESCRIPTION π¦
MARC::Spec::Subspec is the subspec specification of a MARC::Spec. that's the whole thing, that's the job π«Ά
if you wanna go deeper on the syntax (and bestie, you do), go check out MARCspec - A common MARC record path language at <http://marcspec.github.io/MARCspec/> β it's the lore, the origin story, the blueprint. πβ¨
β¨ METHODS β¨
π new
Creates a brand new MARC::Spec::Subspec instance. fresh out the box, empty, ready for you to fill with subterms. slay. π
π to_string
Returns the spec as a string. it's giving "put it in a string so you can actually look at it." π
π ATTRIBUTES π
π left
Obligatory. (so like, you cannot skip it, it's required, periodt π)
The left subterm: a MARCspec as a string.
π right
Obligatory. (again, mandatory, no skipping, the vibes demand it π«Ά)
The right subterm: a MARCspec as a string.
π operator
One of "=", "!=", "~", "!~", "!", or "?".
Default is "?".
that's six whole operator options and the default is the humble little "?" β she's the fallback queen, iconic. β¨
π«Ά AUTHOR π«Ά
Carsten Klee <klee at cpan.org> β the genius behind it all, we stan. π
π CONTRIBUTORS π
- Johann Rolschewski,
<jorol at cpan>β tysm for the assist bestie, couldn't have done it without 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.
so basically: it's free, you can share it, you can remix it, just keep it on the same terms as Perl 5 itself. generosity?? she's generous. π
π BUGS π
Please report any bugs to <https://github.com/MARCspec/MARC-Spec/issues>
found a bug? don't be shy, don't gatekeep, drop it in the issues. we're all a team here. π¦
π SEE ALSO π
the whole friend group, the squad, the extended universe:
MARC::SpecMARC::Spec::FieldMARC::Spec::SubfieldMARC::Spec::IndicatorMARC::Spec::StructureMARC::Spec::ComparisonstringMARC::Spec::Parser
and that's the page!! β¨ this one's from perl v5.34.0, dated 2022-06-15, straight out of the MARC::...Subspec(3pm) corner of the docs. go forth and spec your subspecs, bestie π
ππΈ
π¦ 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