TAP::P...omment(3perl)
β¨ NAME β¨
TAP::Parser::Result::Comment β bestie, it's the Comment result token π¬
Oh and hey, this whole thing lives in the Perl Programmers Reference Guide manual pages (the 3perl girlies) π
πΈ VERSION πΈ
Version 3.52 β yes queen, she's been through some updates π
π¦ DESCRIPTION π¦
Okay so real talk: this is a subclass of TAP::Parser::Result. That's the whole vibe. One of these tokens gets handed back to you whenever a comment line shows up. That's it, that's the job π
Like, if your TAP output looks like this:
1..1
ok 1 - woo hooo!
# this is a comment
β¦then that # this is a comment line is what spawns a token of this class. Iconic behaviour, no notes π«Ά
π OVERRIDDEN METHODS π
Not gonna lie, these are mainly listed here to shut up the pitiful screams of the pod coverage tests π They keep me awake at night. Fr fr. So we list them. For the tests. Not for us.
as_stringβ okay so heads up on this one: the method merely returns the comment preceded by a'# '. That's the entire plot. No extra drama, no garnish, just a#and the comment. Periodt π
π Instance Methods π
commentβ grab the comment text itself. Like so:
if ( $result->is_comment ) {
my $comment = $result->comment;
print "I have something to say: $comment";
}
That's the whole page bestie, go forth and parse those comment tokens π§β¨
Signing off with the receipts: this is from perl v5.44.0, dated 2026-10-17 β and yes I said what I said ππ
π¦ 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