I would only use File::ShareDir for things that are never supposed to be changed, even in testing, except perhaps as the default path (in the INCLUDE_PATH). That way the user or test can add paths which will be preferred where they exist. This is powerful but hard to debug if you don't include the right diagnostics. The ShareDir stuff should play nicely with blib and make test so maybe you're just hitting a development env/setup issue and ShareDir is what you want.

Catalyst applications often use TT and they generally put the templates in the bottom of the application directory under root, e.g.:

/ /lib /root /root/tt2 /root/tt2/lib/macros.tt # lib for "code" templates /root/tt2/src/index.tt # src for /uri matching templates

They can go anywhere though and you can use any kind of configuration or ENV settings to include whatever paths you want for the process phase.


In reply to Re: Dirctory structure for TT2 templates (in test *and* production) by Your Mother
in thread Dirctory structure for TT2 templates (in test *and* production) by MRWolf

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.