MARC::...Subspec(3pm)

πŸ“¦
version 2.0.3 Β· 2 versions
  • 2.0.3 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 2.0.3 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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.

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 πŸ’–

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::Spec
  • MARC::Spec::Field
  • MARC::Spec::Subfield
  • MARC::Spec::Indicator
  • MARC::Spec::Structure
  • MARC::Spec::Comparisonstring
  • MARC::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