Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of LTjake (4001)

Monday September 19, 2005
08:03 AM

Module::Build's pm_files in ExtUtils::MakeMaker?

[ #26773 ]

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

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/photos_index.tmpl',
    'etc/photos_single.tmpl' => 'lib/CGI/Application/PhotoGallery/photos_single.tmpl',

    # wish i could just do the templates...

    'lib/CGI/Application/PhotoGallery.pm'        => 'lib/CGI/Application/PhotoGallery.pm',
    'lib/CGI/Application/PhotoGallery/GD.pm'     => 'lib/CGI/Application/PhotoGallery/GD.pm',
    'lib/CGI/Application/PhotoGallery/Magick.pm' => 'lib/CGI/Application/PhotoGallery/Magick.pm'
}

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?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.