Perl::Tags::Tag(3)
π Perl::Tags::Tag π
okay bestie, welcome to Perl::Tags::Tag β this is the tag object situation from the User Contributed Perl Documentation, and it's literally the little guy that knows how to turn Perl code into ctags lines. it's giving plumbing but make it cute. let's go π«Ά
β¨ The Methods β¨
"new"β hands you a brand new tag object. fresh out the box, no cap. π"type","modify_options"β these two are abstract methods. like, they're placeholders, they're not doing the work themselves, that's on the subclasses. iykyk π"to_string"β a tag stringifies itself into the appropriate line for a ctags file. that's the whole glow-up: object in, ctags line out. β¨"on_register"β this one lets a tag meddle with the process when it gets registered with the main tagger object. and listen: return false if you wanna prevent registration entirely (think control tags like"Perl::Tags::Tag::Recurse"β they don't want to actually register, they've got other plans π).
π¦ The Subclasses π¦
Perl::Tags::Tag::Package
"type":p"modify_options"β setsstatic=0. that's it, that's the whole job. π"on_register"β sets the package name. iconic.
Perl::Tags::Tag::Var
"type":v"on_register"β makes a tag for this variable unless we're told not to. and here's the vibe check, straight from the source:
Make a tag for this variable unless we're told not to. We
assume that a variable is always static, unless it appears
in a package before any sub. (Not necessarily true, but
it's ok for most purposes and Vim works fine even if it is
incorrect)
- pltags.pl comments
so yeah, that assumption is lowkey not always true, but it's fine for most purposes and Vim works fine even if it's incorrect. the pltags.pl comments said it, not me. π
Perl::Tags::Tag::Sub
"type":s"on_register"β makes a tag for this sub unless we're told not to. and again, receipts:
Make a tag for this sub unless we're told not to. We assume
that a sub is static, unless it appears in a package. (Not
necessarily true, but it's ok for most purposes and Vim works
fine even if it is incorrect)
- pltags comments
same disclaimer energy as the variable one: not necessarily true, ok for most purposes, Vim's fine with it. periodt. π
Perl::Tags::Tag::Constant
"type":c
Perl::Tags::Tag::Label
"type":l
Perl::Tags::Tag::Recurse
"type":dummy- this one is a pseudo-tag, bestie β go peek at
"register"inPerl::Tagsif you want the lore. π "on_register"β recurses by adding this new module to the queue. main character energy, honestly. π
and that's the whole page, mwah π this beauty came from perl v5.42.0 and it's dated 2025-07-25 β so go forth, tag your Perl, and slay π β¨πΈ
π¦ where this page comes from
- fedora 43: perl-Perl-Tags 0.32-32.fc43 Β· ( GPL-1.0-or-later OR Artistic-1.0-Perl ) OR Vim
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms