Perinc...etadata(3pm)
π Perinci::Object::Metadata β the manual, but make it a group chat π
okay so bestie, you're looking at Perinci::Object::Metadata(3pm) from the Perl world. It's the base class for the Perinci::Object metadata classes, so like⦠everything else in that family is basically its little sibling. periodt.
β¨ NAME β¨
Perinci::Object::Metadata β it's the base class for the Perinci::Object metadata classes π
π¦ VERSION π¦
This doc is describing version 0.311 of Perinci::Object::Metadata (and yes, it's from the Perl distribution called Perinci-Object), released on 2020-01-02. she's a lil vintage, she's still iconic π
π METHODS π
okay here's the whole menu, no skips, no skims, we're doing all of them fr fr π«Ά
π new => obj
Constructor. that's it, that's the vibe β it makes a new object β¨
π v => float
Get the version. just the number, bestie π
π as_struct => hash
Get the underlying data structure. like, the raw thing under the cute wrapper π
π type => str
Return the type β e.g. "function", "package" π she's telling you what she is, main character energy
π langprop([ \%opts, ]$prop[, $new_value])
Get or set a property value in a specific language. To be precise: it looks at either the "prop" property, or the "prop.alt.lang.XXX" properties. multilingual queen π
Known options (yes we're listing all of them):
lang => STRβ defaults to the metadata's"default_lang", which in turn defaults to"en_US"if nobody specified anything. so if you're silent about it, it assumes"en_US", no cap πmark_different_lang => BOOL(defaults to1) β if you set this to true, text in a different language than the one you asked for gets marked. The example from the source: you ask for"I love you"in Indonesian but there's no Indonesian value available, so what comes back is"{en_US I love you}"β flagged, labeled, called out π it's giving "we don't have that translation so here's the one we got, clearly tagged"
π name([ $new_value ]) => $value
Get or set the "name" property. Heads up: it will call "langprop()" for you π«Ά
π summary([ $new_value ]) => $value
Get or set the "summary" property. Also calls "langprop()" β¨
π description([ $new_value ]) => $value
Get or set the "description" property. Yep β "langprop()" again π
π caption([ $new_value ]) => $value
Get or set the "caption" property. And yes bestie, "langprop()" once more πΈ
ngl the pattern is: all four of those property methods ride on langprop(). that's the whole bit, and honestly? slay.
π HOMEPAGE π
The project's homepage lives at <https://metacpan.org/release/Perinci-Object>. go visit her, she'd love that π¦
π§ SOURCE π§
The source repo is at <https://github.com/perlancar/perl-Perinci-Object>. it's right there, lowkey iconic π
π BUGS π
Found a bug? Got a feature request? Please report it on the bugtracker: <https://github.com/perlancar/perl-Perinci-Object/issues> π
And when you submit a bug or a request, please include a test-file or a patch to an existing test-file that shows the bug or the desired feature. not me asking you to actually reproduce it β yes i am, do it, it helps so much ππ«Ά
π AUTHOR π
perlancar <perlancar@cpan.org> β the legend themselves π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2021, 2017, 2016, 2015, 2014, 2013, 2012, 2011 by perlancar@cpan.org.
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 like, go wild, but respectfully π
and that's the whole page bestie β every option, every default, every method, nothing skipped π€ This was Perinci::Object::Metadata, documented as part of perl v5.36.0, dated 2022-10-13, and yeah β the header and footer both truncate the name to Perinc...etadata(3pm) because the terminal ran out of room, and honestly? relatable. she doesn't need the whole name to know who she is π
β¨
π¦ where this page comes from
- ubuntu noble: libperinci-object-perl 0.311-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libperinci-object-perl 0.311-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libperinci-object-perl 0.311-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