Template Variables
In a distribution, I have to duplicate the same pieces of information again and again. For example, bug report email and web URLs should be written in [MetaResources] section of dist.ini and in the documentation, like BUGS.pod.
With a help from Templates plugin I can eliminate duplication. If BUGS.pod is a template, I can use email and web URLs defined in dist.ini, e. g.:
{{$dist->distmeta->{resources}->{bugtracker}->{mailto};}}
Err… This works but requires a lot of typing, (and so typo-prone) and looks ugly. With Hook I can make it not just working, but also elegant. [Hook::Init] section defines few variables in MY package, which can be used in various templates, including documentation and meta resources.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 12:
Non-ASCII character seen before =encoding in 'Err…'. Assuming UTF-8