Perinc...rmalize(3pm)

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

🌸 Perinci::Sub::Normalize(3pm) β€” a User Contributed Perl Documentation moment 🌸

okay bestie, gather round, because today we're talking about Perinci::Sub::Normalize πŸ’– it lives in the User Contributed Perl Documentation corner of your man pages and honestly? it's giving "tiny module, big responsibility."


✨ NAME ✨

Perinci::Sub::Normalize β€” normalize Rinci function metadata 🧚


πŸ’œ VERSION πŸ’œ

this doc describes version 0.207 of Perinci::Sub::Normalize (from the Perl distribution Perinci-Sub-Normalize), and it dropped on 2022-12-19. vintage but fresh, yk? πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

use Perinci::Sub::Normalize qw(normalize_function_metadata);

my $nmeta = normalize_function_metadata($meta);

that's it. that's the whole vibe. two lines and you're iconic ✨


πŸ‘‘ FUNCTIONS πŸ‘‘

🌈 normalize_function_metadata($meta[ , \%opts ]) => HASH

so what does it do? it normalizes and checks Rinci function metadata $meta πŸ”₯ it hands you back the normalized metadata, which is a shallow copy of $meta. and if something's wrong? it dies. no cap, it will simply pass away and take your script with it πŸ’€

here are the options you can pass, bestie:

  • allow_unknown_properties => BOOL (default: 0) β€” set this to true and it will die if there are unknown properties. yes, the option called "allow" is the one that kills you. it's giving chaotic. πŸ™ˆ
  • normalize_sah_schemas => BOOL (default: 1) β€” by default, Sah schemas β€” like the ones chilling in the result/schema property or args/*/schema β€” get normalized using Data::Sah's normalize_schema. set this to 0 if you don't want that, no pressure, live your truth πŸ’…
  • remove_internal_properties => BOOL (default: 0) β€” set this to 1 and every property and attribute starting with an underscore (_) will be stripped out. per the DefHash specification, those get ignored anyway and usually just hold notes, comments, or extra info πŸŽ€

🫢 HOMEPAGE 🫢

come visit the project's homepage, it's cute: <https://metacpan.org/release/Perinci-Sub-Normalize> ✨


🌸 SOURCE 🌸

the source repo lives at: <https://github.com/perlancar/perl-Perinci-Sub-Normalize> πŸ’–


⭐ SEE ALSO ⭐

Rinci::function β€” go read it, iykyk πŸ“š


πŸ’œ AUTHOR πŸ’œ

perlancar <perlancar@cpan.org> πŸ‘‘


πŸ¦‹ CONTRIBUTOR πŸ¦‹

Steven Haryanto <stevenharyanto@gmail.com> 🫢


🧚 CONTRIBUTING 🧚

wanna help out? you can send patches by email/via RT, or slide into the GitHub pull requests πŸ’…

most of the time you do not need to build the distribution yourself. you can literally just modify the code, then test it like:

% prove -l

if you do want to build the distribution (say, to try installing it locally on your system), you'll need to install Dist::Zilla, Dist::Zilla::PluginBundle::Author::PERLANCAR, Pod::Weaver::PluginBundle::Author::PERLANCAR, and sometimes one or two other Dist::Zilla- and/or Pod::Weaver plugins. any additional steps required beyond that are considered a bug and can be reported to me. so if it's weird, it's a bug, periodt ✨


this software is copyright (c) 2022, 2018, 2016, 2015, 2014 by perlancar <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. slay πŸ’…


πŸ’€ BUGS πŸ’€

please report any bugs or feature requests on the bugtracker website: <https://rt.cpan.org/Public/Dist/Display.html?Name=Perinci-Sub-Normalize> πŸ›

when submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. help me help you bestie πŸ™

not me ending the whole page with a bug section, but honestly? iconic behavior. πŸ’–

and that's the whole page!! footer tea: this was rendered by perl v5.36.0 on 2022-12-30, filed under Perinc...rmalize(3pm) πŸŽ€ byeeee, go normalize something βœ¨πŸ’œπŸ¦‹

πŸ“¦ where this page comes from