Event:..._Event(3pm)
π Event::Distributor::_Event β the perl manual page, bestie edition π
okay so this is Event:..._Event(3pm) from the User Contributed Perl Documentation, and it's literally the blueprint page for Event::Distributor::_Event, no cap.
β¨ NAME β¨
Event::Distributor::_Event β it's the base class for Event::Distributor events. the mother of all events, the blueprint, the origin story. periodt.
πΈ DESCRIPTION πΈ
so this class is the base class, and these actual classes below are derived from it, like it's their whole parent situation:
Event::Distributor::SignalEvent::Distributor::Query
now listen β instances of this class are not supposed to be directly created by end-user code. like, that's not the vibe. it's not for you to instantiate yourself, bestie. but it is documented here so we can list out all the shared methods that every subclass gets to have. it's giving "documented for your convenience, not for your constructor calls." π
π METHODS π
subscribe
$event->subscribe( $code )
this one adds a brand new CODE reference that subscribes to the event. that code is expected to return a Future instance. that's the assignment, okay? return a Future. no funny business. π¦
subscribers
@codes = $event->subscribers
returns a list of CODE references that were previously subscribed. it's just the whole guest list of everyone who already pulled up. π
π EXPECTED METHODS π
so subclasses are expected to implement the following methods. like, this is the homework. if you're a subclass, you gotta do this:
fire
$f = $event->fire( @args )
this one gets invoked by Event::Distributor to actually run the signal. for real for real, this is the moment. it's expected to invoke any or all subscribers in whatever manner it implements β however it wants to do it, that's on the implementation β passing arguments as required, and collecting results in some way to provide as the eventual answer of the Future it returns. so: call the subscribers, pass the args, gather the results, hand back a Future that eventually has the answer. iconic behaviour, honestly. π₯
π«Ά AUTHOR π«Ά
Paul Evans <leonerd@leonerd.org.uk>
and that's the whole page, babes π§ β brought to you by perl v5.32.1, dated 2021-09-29, source straight outta the User Contributed Perl Documentation. go forth and not-instantiate this class directly. mwah πβ¨
π¦ where this page comes from
- debian bookworm: libevent-distributor-perl 0.06-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libevent-distributor-perl 0.06-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libevent-distributor-perl 0.06-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libevent-distributor-perl 0.06-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libevent-distributor-perl 0.06-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libevent-distributor-perl 0.06-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms