Hello
I would like to include some templates with a Module I am developing, but I'm not sure how I would include them such that when the module is installed the templates are accessible.
I use Dist::Zilla to mint the skeleton and build/test/release the module.
So if I put my templates in lib/Foo/Templates/*.tt, what parameter to I feed my Template->new to to tell it to search in the $default_locations/Foo/Templates/? Ideally, I would prefer not to have to specify all the locations, because there are a number of pitfalls with that solution (what if module is installed in non standard location, what if a windows user installs the module, etc.)
I think this is what tells it to search my local build directory:
my $tt = Template->new({ INCLUDE_PATH => ['lib/Foo/Templates'], }) || die "$Template::ERROR\n";
Thanks Monks!
In reply to Distributing/Accessing Template::Toolkit Templates by three18ti
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |