How to bundle and use Plugin Specific views?
Hi, I am creating function specific modules that can be used across multiple applications. These modules has associated views/function/*.tt files. When Installed from CPAN these files will reside in the system-Perl folder... My reading of the document indicates that Dancer2 searches for the view files only in the $appdir/views. 1. How do I ensure that it also picks up the templates from the Perl install path? 2. Is there a module on CPAN which solves this problem? Regards Vijay -- https://www.facebook.com/vijayvithal.jahagirdar https://twitter.com/jahagirdar_vs http://democracies-janitor.blogspot.in/
On 2018-09-01 12:42 AM, vijayvithal jahagirdar wrote:
I am creating function specific modules that can be used across multiple applications. These modules has associated views/function/*.tt files.
2. Is there a module on CPAN which solves this problem? Regards
https://metacpan.org/pod/File::ShareDir::Dist might be the tool you are looking for. It makes it easy to bundle generic files with distributions and retrieve them when installed as part of them. I use it a lot to distribute css / js files as part of my plugins. Joy, `/anick
participants (2)
-
vijayvithal jahagirdar -
Yanick Champoux