blue_cowdawg has asked for the wisdom of the Perl Monks concerning the following question:

OK, so once upon a time I found a Makefile.PL hack that would allow me to take a bunch of files and install them as-is in an arbitrary location.

The backdrop to this story is I'm writing a mod_perl based application for my own use and want to add a bunch of template files to the mix. I've started off by creating a CPAN style structure using h2xs.

AnyMonk out there know how I'd go about adding instructions for installing templates to an arbitrary directory to Makefile.PL? I know I did it years ago, but I can't remember how the heck I did it...


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

Replies are listed 'Best First'.
Re: Makefile.PL and data files
by Khen1950fx (Canon) on Jul 30, 2011 at 18:54 UTC
Re: Makefile.PL and data files
by szabgab (Priest) on Jul 31, 2011 at 18:12 UTC
    If you use Module::Install you can call install_share; that would install all the files it finds in the share/ directory of the distribution.

    Then at run time you can call

    my $share = File::ShareDir::dist_dir('Your::Module');
    and it will return the directory where all the content of the share directory was installed.

    We use this in Padre.

Re: Makefile.PL and data files
by Anonymous Monk on Jul 31, 2011 at 06:17 UTC