Distributing/Accessing Template::Toolkit Templatesby three18ti (Scribe)
|on Nov 05, 2013 at 06:20 UTC||Need Help??|
three18ti has asked for the
wisdom of the Perl Monks concerning the following question:
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: