Test::Perl::Tags(3)

πŸ“¦
version 0.32 Β· 2 versions
, in fedora 43

✨ NAME ✨

Test::Perl::Tags β€” testing output of Perl::Tags πŸ·οΈπŸ’–

Like, it's the little test helper that goes "bestie, did your tagger actually tag what you said it tagged?" and then checks. No cap.


🌸 SYNOPSIS 🌸

use Test::Perl::Tags;

# do some tagging

tag_ok $tagger,
    SYMBOL => 'path/to/file.pm' => 'searchable bookmark',
    'Description of this test';

tag_ok $tagger,
    SYMBOL => 'path/to/file.pm' => 'searchable bookmark' => 'p' => 'line:3' => 'class:Test',
    'Add additional parameters for exuberant extension';

okay so the vibe here is: you've got a $tagger (your Perl::Tags thing, your main character 🫢), you've done some tagging, and now you wanna check the output. You call tag_ok and hand it the tagger first, then a SYMBOL key, then the path to the file you're looking at ('path/to/file.pm'), then the bookmark you wanna search for ('searchable bookmark'), and finally a lil description of the test so future-you knows what was being tested.

And if you're feeling extra πŸ’…, you can keep stacking on more parameters before the description β€” like 'p' => 'line:3' => 'class:Test' β€” and those extra bits get passed along as additional parameters for the exuberant extension. Slay.


lowkey the whole thing is just: tag stuff, then tag_ok it. That's the whole gig. ✨

This page lives in the User Contributed Perl Documentation section, and it came to you courtesy of perl v5.42.0 on 2025-07-25. ily, go tag something πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from