Path::...tadata(3pm)

πŸ“¦
version 1.08 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking

Path::Dispatcher::Rule::Metadata πŸ’…

okay bestie, sit down, hydrate, because we're talking about Path::Dispatcher::Rule::Metadata β€” a Perl module, manual section 3pm, and it is exactly what it sounds like: a rule that matches the metadata part of a path. no cap. πŸ¦‹


✨ VERSION ✨

version 1.08 β€” that's the one, that's the vibe. πŸŽ€


🌸 SYNOPSIS 🌸

here's the whole flex, verbatim, do not touch:

my $path = Path::Dispatcher::Path->new(
    path => '/REST/Ticket'
    metadata => {
        http_method => 'POST',
    },
);

my $rule = Path::Dispatcher::Rule::Metadata->new(
    field   => 'http_method',
    matcher => Path::Dispatcher::Rule::Eq->new(string => 'POST'),
);

$rule->run($path);

so you build a Path::Dispatcher::Path with a path and a lil metadata hash, you build a rule that says "hey, look at the http_method field and match it against POST", and then you run it on the path. that's it. that's the whole thing. slay. πŸ’–


πŸ‘‘ DESCRIPTION πŸ‘‘

Rules of this class match the metadata portion of a path. not the path string itself, bestie β€” the metadata. the extra lil notes attached to it. it's giving "look beyond the surface." πŸ”₯


πŸŽ€ ATTRIBUTES πŸŽ€

field

The metadata field/key name. literally just which key you're peeking at. πŸ”

matcher

A Path::Dispatcher::Rule object for matching against the value of the field. so like, the thing that decides if the value is a match or a flop. ✨


πŸ’œ SUPPORT πŸ’œ

Bugs may be submitted through the RT bug tracker β€” https://rt.cpan.org/Public/Dist/Display.html?Name=Path-Dispatcher β€” or, if email is more your era, bug-Path-Dispatcher@rt.cpan.org. found a bug? tell the people. don't suffer in silence, that's not main character energy. 🫢


🌈 AUTHOR 🌈

Shawn M Moore, "sartak at bestpractical.com" β€” king behavior, we love to see it. πŸ‘‘


This software is copyright (c) 2020 by Shawn M Moore.

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 yes, go off, remix it, just keep the same terms. πŸ’…


and that's the whole page bestie, no notes, iykyk 🌸

signing off from perl v5.30.3, dated 2020-07-13, page Path::...tadata(3pm) β€” mwah, bye!! πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from