name     = TemplateVariables
abstract = Hook demo: Define variables for later use in templates.
version  = v0.0.1
[Hook::Init/my vars]                ; <<<=== Look at this
    . = package MY;
    . = our $name    = $dist->name;
    . = our $bt_mail = "mailto:bug-$name\@bt.example.org";
    . = our $bt_web  = "https://bt.example.org/display.html?name=$name";
    ;   BTW, Hook::BeforeBuild cannot be used here: it works too late,
    ;   MetaResources::Template will not see the variables.
[GenerateFile/Assa.pm]
    filename = lib/Assa.pm
    content  = package Assa; 1;
[GatherDir]
[PruneCruft]
[FileFinder::ByName/BUGS.pod]       ; <<<=== Look at this
    file = BUGS.pod
[Templates]                         ; <<<=== Look at this
    templates = BUGS.pod
[MetaResources::Template]           ; <<<=== Look at this
    bugtracker.mailto = {{$MY::bt_mail}}
    bugtracker.web    = {{$MY::bt_web}}
    license           = {{$dist->license->url}}
[MetaJSON]
[FakeRelease]