Web::S...e::Role(3pm)

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

✨ NAME ✨

okay so bestie, welcome to Web::Simple::Role πŸ’– β€” this is the lil module that lets you define roles for Web::Simple applications. that's it, that's the vibe. no cap. πŸ‘‘


🌸 SYNOPSIS 🌸

so like, here's how you actually use it. first, in your app:

package MyApp;
use Web::Simple;
with MyApp::Role;

sub dispatch_request { ... }

and then over in the role, you do your lil thing with around πŸŽ€:

package MyApp::Role;
use Web::Simple::Role;

around dispatch_request => sub {
  my ($orig, $self) = @_;
  return (
    $self->$orig,
    sub (GET + /baz) { ... }
  );
};

and boom πŸ’₯ β€” now MyApp can also dispatch /baz too. it's giving main character energy, fr fr. the way that role just slid in and added a whole new route?? iconic. πŸ¦‹


πŸ‘‘ AUTHORS πŸ‘‘

See Web::Simple for authors. πŸ’œ


See Web::Simple for the copyright and license. 🌈


and that's the whole page bestie, short and sweet, just like a good commit message 🫢

perl v5.34.0 Β· 2022-06-28 Β· that's the version and date this lil manpage was born, and honestly? it ate. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from