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 uses Time::HiRes if 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 of get_time is high resolution. ie. it's true if Time::HiRes is available. basically a vibe check on your timing precision πŸ•°οΈβœ¨
  • get_times β€” returns an array reference of the four-element list of CPU seconds, exactly like times in 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