Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

NB: This has been cross-posted to my journal

As I do some work to my older modules, I'm converting their installation procedures to Module::Build (mentioned here).

Whilst updating CGI::Application::PhotoGallery, I ran in to a little bug (detailed by Phred). The desired behavior is to have the default templates install in @INC so i can simply add @INC to the include paths and they'll be used as a fall-back mechanism. The way I achieved that with ExtUtils::MakeMaker was to put them directly in the /lib/ directory in the distro and EU::MM will happily copy them over on make install.

With Module::Build, i can take them out of the lib directory and put them in /etc/ and use the pm_files option to make sure they're copied over:

pm_files => { 'etc/photos_index.tmpl' => 'lib/CGI/Application/PhotoGallery/phot +os_index.tmpl', 'etc/photos_single.tmpl' => 'lib/CGI/Application/PhotoGallery/phot +os_single.tmpl', # wish i could just do the templates... 'lib/CGI/Application/' => 'lib/CGI/Applicati +on/', 'lib/CGI/Application/PhotoGallery/' => 'lib/CGI/Applicati +on/PhotoGallery/', 'lib/CGI/Application/PhotoGallery/' => 'lib/CGI/Applicati +on/PhotoGallery/' }

This is fine and dandy, except that I'm auto-generating a Makefile.PL and Module::Build::Compat has no way to handle that construct.

So, is there a better way to handle this scenario, or should i revert to stuffing my templates in the /lib/ directory?

Update: Minor style updates.

"Go up to the next female stranger you see and tell her that her "body is a wonderland."
My hypothesis is that she’ll be too busy laughing at you to even bother slapping you.
" (src)

In reply to Module::Build's pm_files in ExtUtils::MakeMaker? by LTjake

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others cooling their heels in the Monastery: (8)
    As of 2018-02-20 16:13 GMT
    Find Nodes?
      Voting Booth?
      When it is dark outside I am happiest to see ...

      Results (272 votes). Check out past polls.