TAP::Base(3perl)
π TAP::Base π
okay bestie so first things first: this is TAP::Base, from the Perl Programmers Reference Guide (that's the 3perl manual section, iykyk). She's the base class that hands out all the common functionality to TAP::Parser and TAP::Harness β think of her as the mom friend who already packed everything so the other classes don't have to π«Ά
β¨ VERSION β¨
Version 3.52 πΈ
π SYNOPSIS π
so you just wanna inherit from her, right? say less:
package TAP::Whatever;
use base 'TAP::Base';
# ... later ...
my $thing = TAP::Whatever->new();
$thing->callback( event => sub {
# do something interesting
} );
that's it. that's the whole vibe. inherit, instantiate, hook up a callback, go live your life π
π¦ DESCRIPTION π¦
TAP::Base provides callback management. that's her whole thing. no cap.
She's the lowkey backbone β you don't really talk to her directly, you just sort of inherit her energy and suddenly your class can do callbacks and tell time with extra precision. main character support system behavior honestly π
π METHODS π
π Class Methods
callbackβ install a callback for a named event. you give it an event name and a sub, and now every time that event pops off, your code gets to react. it's giving "notify me when it happens" β¨get_timeβ returns the current time, and she usesTime::HiResif it's available. so like, precision when she can get it, regular time when she can't. adaptable queen πΈtime_is_hiresβ returns true if the time coming out ofget_timeis high resolution. ie. it's true ifTime::HiResis available. basically a vibe check on your timing precision π°οΈβ¨get_timesβ returns an array reference of the four-element list of CPU seconds, exactly liketimesin perlfunc. four elements, one arrayref, no notes π
reminder bestie: this page is genuinely short and that's the whole point β TAP::Base is pure infrastructure. small class, big slay π
and that's the page, periodt β¨π
this little manual lives in the Perl Programmers Reference Guide, version perl v5.44.0, dated 2026-10-17. thanks for coming to my ted talk, go write some callbacks ππ¦
π¦ where this page comes from
- arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND 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