NB: You will need to have a vim with perl compiled in it.
Debuntu packages this as vim-perl.
Alternatively you can compile from source (you'll need Perl + the development headers libperl-dev).

(Note that perl-tags-vim includes its own copy of Perl::Tags through the magic of git submodules and App::FatPacker,
so you don't need to install this module from CPAN if you are only intending to use it with Vim as above!)

This is a more-or-less straight ripoff, slightly updated, of the original pltags code. This is a "naive" tagger, in that it makes pragmatic assumptions about what Perl code usually looks like (e.g. it doesn't actually parse the code.) This is fast, lightweight, and often Good Enough.

Documentation patches are welcome: in the meantime, have a look at Perl::Tags::Naive and its subclasses for a simple line-by-line method of tagging files. Alternatively Perl::Tags::PPI uses PPI's built in method of parsing Perl documents.

In general, you will want to override the get_tags_for_file method, returning a list of Perl::Tags::Tag objects to be registered.

For recursively checking other modules, return a Perl::Tags::Tag::Recurse object, which does not create a new tag in the resulting perltags file, but instead processes the next file recursively.

The parsing is done by a number of lightweight objects (parsers) which look for subroutine references, variables, module inclusion etc. When they are successful, they call the register method in the main tags object.

Note that if your tagger wants to register not a new declaration but rather a usage of another module, then your tagger should return a Perl::Tags::Tag::Recurse object. This is a pseudo-tag which causes the linked module to be scanned in turn. See Perl::Tags::Naive's handling of use statements as an example!