I think ShareDir can work for you with care and blib (I haven't done this so, consider it salted/untested). You'll just need to run something like this before using the code in dev:

perl Makefile.PL && make # then- use blib; # or perl -Mblib ...executable...

The blib stuff should function as production code would; i.e., ShareDir will find the right things in a relative fashion under, I think, blib/**/auto/... The pain being that you might need to run make all the time to see code changes.

For Catalyst, take a look at the source code for home() in Catalyst::Utils. It uses the presence of a Makefile.PL (or other dev env markers) to determine the root of the application (local/anywhere v formally installed) and where it can find its files relatively. This is a bit of a systems/deployment decision more than a code choice though so I'm not sure I'd recommend it.


In reply to Re^3: 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.