Debian::DEP12(3pm)
π 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::Entryinstance - a
Text::BibTeX::Fileinstance - 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
- ubuntu resolute: libdebian-dep12-perl 0.2.0-1 Β· BSD-3-Clause
- ubuntu stonking: libdebian-dep12-perl 0.2.0-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms