Debian::DEP12(3pm)

πŸ“¦
version 0.2.0 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– Debian::DEP12 πŸ’–

okay bestie, sit down, hydrate, because we're talking about Debian::DEP12 β€” the Perl module that's basically an interface to the Debian DEP 12 format. it lives in the User Contributed Perl Documentation section, manual page Debian::DEP12(3pm), and it's lowkey iconic. 🫢


✨ NAME ✨

Debian::DEP12 β€” interface to Debian DEP 12 format. that's it, that's the whole name, periodt. πŸ’…


✨ SYNOPSIS ✨

here's the vibe in code form, no cap:

use Debian::DEP12;

my $meta = Debian::DEP12->new;
$meta->set( 'Bug-Database',
            'https://github.com/merkys/Debian-DEP12/issues' );

$meta->validate;

like… look at her. creating an object, setting a field, validating. main character energy fr fr. πŸ‘‘


✨ DESCRIPTION ✨

so Debian::DEP12 is an object-oriented interface for the Debian DEP 12 format, which is also known as debian/upstream/metadata (iykyk). the whole primary focus of the initial development era was validating and fixing DEP 12 data β€” she's a fixer, a validator, a whole vibe check for your metadata. 🧚

now here's the tea: DEP 12 is in draft state, and the development is happening over on its wiki page (<https://wiki.debian.org/UpstreamMetadata>). so yeah, Debian::DEP12 is out here trying to keep up with the DEP 12 specification β€” chasing the spec like it's a group chat that never sleeps. 😭 to keep track of which version of the spec she's matching, the UTC timestamp of the DEP 12 wiki page is stored in the $DEP12_VERSION class variable. remember that variable, bestie, she's important. ⭐

Contributions welcome! 🌈 genuinely, come through, the door is open, we love a collaborative queen.


✨ METHODS ✨


🌸 new( $what )

creates a fresh new Debian::DEP12 instance. she can be born from any of these:

  • a YAML thing
  • a Text::BibTeX::Entry instance
  • a Text::BibTeX::File instance
  • or a plain old Perl hash reference with DEP 12 fields and their values

pick your origin story, bestie, they're all valid. πŸ’œ


🌸 fields()

returns an array of fields defined in the instance β€” and the order? any order. chaotic, but we respect it. πŸ¦‹


🌸 get( $field )

returns the value of a field. simple, clean, no drama. ✨


🌸 set( $field, $value )

sets a new value for a field. and plot twist β€” it returns the old value. so you always know what you replaced, like a receipts-keeping icon. πŸ’…


🌸 delete( $field )

unsets the value for a field. and yes, she also returns the old value, because she's polite like that. πŸŽ€


🌸 to_YAML()

returns a string with the YAML representation. glow up in text form. 🌟


🌸 validate()

performs checks of the DEP 12 data in the instance, and returns an array of validation messages as instances of Debian::DEP12::ValidationWarning. she's checking your work, gently but thoroughly. πŸ‘‘


✨ SEE ALSO ✨

for the full description of DEP 12, go read the source of truth: <https://dep-team.pages.debian.net/deps/dep12/>. ✨


✨ AUTHORS ✨

Andrius Merkys, <merkys@cpan.org> πŸ’–


and that's the whole page, bestie!! 🫢✨ written for perl v5.40.0, dated 2024-09-28, and that's the Debian::DEP12(3pm) manual page, signed, sealed, slayed. mwah. πŸ’…πŸŽ€

πŸ“¦ where this page comes from