Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use own templates #5

Open
gergap opened this issue Sep 1, 2019 · 1 comment
Open

How to use own templates #5

gergap opened this issue Sep 1, 2019 · 1 comment

Comments

@gergap
Copy link

gergap commented Sep 1, 2019

Hi,

I need to use a slightly modified TT2 template,
but at the moment I don't see a way to use it,
because both absolute and relative paths are not allowed.
Maybe this was different in older versions of TT or I overlook something.

By default the code searches for the template in /usr/share/perl5, the default perl5 installation path on Debian Linux.

using the options prove -l -m -P HTML=outfile:html/index.html,template:/path/to/ansi_report.tt2 ...
you get this error:
file error - /path/to/ansi_report.tt2: absolute paths are not allowed (set ABSOLUTE option)

using the options "HTML=outfile:html/index.html,template:../path/to/ansi_report.tt2"
file error - ../path/to/ansi_report.tt2: relative paths are not allowed (set RELATIVE option)

To fix this we we need to change the code in HTML.pm to allow ABSOLUTE
see also http://www.template-toolkit.org/docs/manual/Config.html#section_ABSOLUTE

As a temp. workaround I copy the template into /usr/share/perl5. But that's abviously not a good solution.

@eserte
Copy link
Contributor

eserte commented Mar 6, 2020

I also stumbled over this problem and opened https://rt.cpan.org/Ticket/Display.html?id=132071

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants