Event:...lbacks(3pm)

πŸ’– Event::ExecFlow::Callbacks β€” the manual, but make it make sense πŸ’–

okay bestie, so this page is Event::ExecFlow::Callbacks(3pm) β€” that's the truncated lil name your terminal shows you β€” and it lives in the User Contributed Perl Documentation section. It ships with perl v5.38.2. Come sit with me, we're gonna get you fluent in callbacks in like five minutes, no cap. πŸŽ€


✨ NAME ✨

Event::ExecFlow::Callbacks β€” the whole entire vibe of this class is callbacks attached to jobs. That's it, that's the job. πŸ’…


🌸 SYNOPSIS 🌸

here's the receipts, copy them exactly because I am not about to let you typo your way through this:

#-- Create a new Callbacks object
my $callbacks = Event::ExecFlow::Callbacks->new (
  sub { print "sub called\n" },
  sub { print "another sub of this called\n" },
);

#-- Attach callbacks to a job
$job->set_pre_callbacks($callbacks);

#-- Add more subs
$callbacks->add(sub { print "a sub added later\n" });
$callbacks->prepend(sub { print "a sub prepended to the list of subs } );

#-- the execute() methods is executed later by Event::ExecFlow
$callbacks->execute($job);

so you make the object, you hand it to a job with set_pre_callbacks, you can pile more subs on later with add or shove one to the front with prepend, and then Event::ExecFlow itself calls execute on it whenever it's time. πŸ¦‹


πŸ‘‘ DESCRIPTION πŸ‘‘

This class represents one or more closures which can be attached as callbacks to an Event::ExecFlow::Job.

like, that's the whole personality. it's a lil bundle of coderefs that a Job carries around and fires off when the moment's right. not me being obsessed with how tidy that is. 😭


🌈 OBJECT HIERARCHY 🌈

the family tree, so you know who's related to who:

Event::ExecFlow

Event::ExecFlow::Job
+--- Event::ExecFlow::Job::Group
+--- Event::ExecFlow::Job::Command
+--- Event::ExecFlow::Job::Code

Event::ExecFlow::Frontend
Event::ExecFlow::Callbacks
Event::ExecFlow::Scheduler
+--- Event::ExecFlow::Scheduler::SimpleMax

notice Event::ExecFlow::Callbacks is sitting there at the top level, no parent, no children β€” it's giving independent queen. πŸ‘‘


πŸ’… ATTRIBUTES πŸ’…

Attributes can by accessed at runtime using the common get_ATTR(), set_ATTR() style accessors.

[ FIXME: describe all attributes in detail ]

yeah so, that FIXME is literally in the original docs, bestie. the attributes are real and they're accessible, they're just not written up yet. we keep it honest around here. πŸ™ˆ


πŸ”₯ METHODS πŸ”₯

[ FIXME: describe all methods in detail ]

same situation, same energy. the methods exist, the detail section is a placeholder. no cap, that's exactly what the page says. πŸ’€


🫢 AUTHORS 🫢

JΓΆrn Reder <joern at zyn dot de>

one author, one legend, we love to see it. πŸ’œ


Copyright 2005-2006 by JΓΆrn Reder.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.

ok so real talk: that warranty disclaimer is not a joke and not a vibe, it's the actual legal situation. no promises, no guarantees, you're on your own if it breaks. the license text above is the whole deal, don't let anyone tell you otherwise. 🌸

πŸ’€ POD ERRORS πŸ’€

Hey! The above document had some coding errors, which are explained below:

Around line 112: Non-ASCII character seen before =encoding in 'JΓΆrn'. Assuming CP1252

yeah the â in Jârn tripped up the POD parser and it just assumed CP1252. iconic behavior honestly. 😭


and that's the whole page, bestie β€” callbacks understood, hierarchy memorized, FIXMEs acknowledged with grace. signing off from perl v5.38.2, dated 2024-02-17, brought to you by User Contributed Perl Documentation. go forth and attach some closures. πŸ§šπŸ’–

πŸ“¦ where this page comes from