Perinc...Module(3pm)

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

πŸ’– Perinci::Sub::Util::PropertyModule πŸ’–

okay so bestie, welcome to the manual page for Perinci::Sub::Util::PropertyModule (that's the 3pm manual section, Perl fam rise up 🫢). this is the little helper that looks at your Rinci function metadata and is like "hmm which property modules do you actually need, girl?" β€” and then tells you. no cap. ✨


🌸 NAME 🌸

Perinci::Sub::Util::PropertyModule β€” given a Rinci function metadata, find what property modules are required πŸ’…

like literally that's the whole job. you hand it metadata, it hands you back the list of property modules. iconic behaviour tbh.


✨ VERSION ✨

this doc describes version 0.46 of Perinci::Sub::Util::PropertyModule, which ships in the Perl distribution Perinci-Sub-Util-PropertyModule, and it was released on 2016-05-15. vintage but still slaying πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

here's the vibe, bestie:

use Perinci::Sub::Util::PropertyModule qw(get_required_property_modules);

my $meta = {
    v => 1.1,
    args => {
        foo => {
            ...
            'form.widget' => '...',
        },
        bar => {},
    },
    'cmdline.skip_format' => 1,
    result => {
        table => { ... },
    },
};
my $mods = get_required_property_modules($meta);

and the result? the moment we've all been waiting for:

['Perinci::Sub::Property::arg::form',
 'Perinci::Sub::Property::cmdline',
 'Perinci::Sub::Property::result::table']

see how it sniffed out all three?? obsessed. 🌈


πŸ¦‹ FUNCTIONS πŸ¦‹

get_required_property_modules($meta) => array

ok so here's the tea β˜• β€” the Perinci framework is modular, meaning extra properties can just show up whenever somebody drops a new property module. those live under Perinci::Sub::Property::*. and like… some of these properties are experimental, some are 3rd party, some are just vibes. πŸ™ˆ

this function detects which modules are used. that's it, that's the whole function, and it eats every time. πŸ‘‘

also?? you can run this during distribution building to automatically add those modules as prerequisites. so your distro never forgets a dependency, because forgetting dependencies is giving "chaos" and we don't do that here. ✨


🌈 HOMEPAGE 🌈

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


🧚 SOURCE 🧚

the source repository lives here: <https://github.com/perlancar/perl-Perinci-Sub-Util-PropertyModule>

go forth and read the code, it's lowkey fascinating πŸ’œ


πŸ’€ BUGS πŸ’€

found a bug? got a feature request? please report it on the bugtracker website, and don't be shy: <https://rt.cpan.org/Public/Dist/Display.html?Name=Perinci-Sub-Util-PropertyModule>

when you submit a bug or a request, please include a test-file or a patch to an existing test-file that illustrates the bug or the desired feature. fr fr, it helps SO much and we will love you for it. 🫢

πŸ‘‘ AUTHOR πŸ‘‘

perlancar <perlancar@cpan.org> β€” legend, icon, the moment. πŸ’…


this software is copyright (c) 2016 by perlancar@cpan.org.

it's free software, bestie β€” you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay. periodt. πŸ’–


and that's the whole page!! πŸŽ€ this came to you from perl v5.34.0, dated 2022-06-16, under the Perinc...Module(3pm) header. mwah, go write some metadata. βœ¨πŸ’œ

πŸ“¦ where this page comes from