MooseX...etArgs(3pm)

πŸ“¦
version 0.215 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– MooseX::POE::SweetArgs πŸ’–

okay bestie, so this is MooseX::POE::SweetArgs β€” it's sugar around MooseX::POE event arguments. that's literally the whole name. we're starting strong. ✨

it lives in the User Contributed Perl Documentation, so it's one of those 3pm pages, iykyk.


🌸 VERSION 🌸

this is version 0.215. periodt. no cap.


✨ SYNOPSIS ✨

okay so here's the vibe, look at this:

package Thing;
use MooseX::POE::SweetArgs;

# declare events like usual
event on_success => sub {
  # unpack args like a Perl sub, not a POE event
  my ($self, $foo, $bar) = @_;
  ...
  POE::Kernel->yield('foo');
  ...
};

so you declare events like usual β€” event keyword, sub, all of it β€” and then you unpack your args like a normal Perl sub. not like a POE event. that's the whole glow-up. πŸ¦‹


πŸ’… DESCRIPTION πŸ’…

okay so normally when you're using MooseX::POE, subs declared as events have to use POE macros to unpack @_, like this:

my ($self, $foo, $bar) = @_[OBJECT, ARG0..$#_];

the way that @_[OBJECT, ARG0..$#_] is giving "cryptic incantation"… bestie, no. 😭

using MooseX::POE::SweetArgs as a metaclass lets you skip all that and just use @_ like a normal person:

my ($self, $foo, $bar) = @_;

iconic. obsessed. and since the POE kernel is a singleton, you can access it using class methods, exactly like the synopsis shows you. POE::Kernel->yield('foo') β€” boom. done.

and in all other respects? this behaves exactly like MooseX::POE. same energy, cuter args. πŸ’–


πŸ‘‘ AUTHORS πŸ‘‘

the main characters responsible for this blessing:

  • Chris Prather <chris@prather.org>
  • Ash Berlin <ash@cpan.org>
  • Chris Williams <chris@bingosnet.co.uk>
  • Yuval (nothingmuch) Kogman
  • Torsten Raudssus <torsten@raudssus.de> <http://www.raudssus.de/>

This software is copyright (c) 2010 by Chris Prather, Ash Berlin, Chris Williams, Yuval Kogman, Torsten Raudssus.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


and that's the whole page, bestie πŸ’–βœ¨ this one was generated against perl v5.26.1, and the page itself is dated 2018-03-30. shoutout to the MooseX...etArgs(3pm) header and that footer holding it down at the bottom. mwah. πŸ’…πŸŽ€

πŸ“¦ where this page comes from