PerlPoint::Tags is a Perl module that can process PerlPoint tag declarations.
# declare a tag declaration package
# declare base "class"
use base qw(PerlPoint::Tags);
PerlPoint is built a modularized way. The base packages provide parsing and stream processing for all translators into target formats and are therefore intended to be as general as possible. That's why they not even define tags, because every translator author may wish to provide own tags special to the addressed target projector (or format, respectively). On the other hand, the parser needs to know about tags to recognize them correctly. That is where this module comes in. It serves as a base of tag declaration modules by providing a general import() method to be inherited by them. This method scans the invoking module for certain data structures containing tag declarations and imports these data into a structure in its own namespace. The parser knows about this PerlPoint::Tags collection and makes it the base of its tag handling.
It is recommended to have a "top level" tag declaration module for each PerlPoint translator, so there could be a PerlPoint::Tags::HTML, a PerlPoint::Tags::Latex, PerlPoint::Tags::SDF, a PerlPoint::Tags::XML and so on. (These modules of course may simply invoke lower level declarations.)
Note: We are speaking in terms of "classes" here but of course we are actually only using the mechanism of import() together with inheritance to provide an intuitive and easy to use way of declaration.
As an additional feature, the module provides a method addTagSets() to allow translator users to declare tags additionally.