shipping support data with CPAN dists - SOLVED

Oliver Gorwits oliver.gorwits at
Sat Apr 25 15:45:38 PDT 2009

Hash: SHA1

Oliver Gorwits wrote:
> I'd like to ship these XML files with the distribution
> I'd rather have something 
> portable, and supported by say, Module::Install (which I use), 

Jan encouraged me to have a closer look at Module::Install (thanks!)
and sure enough after a bit of poking around it includes a
Module::Install::Share (just not clearly mentioned IMHO).

"some distributions need to install read-only data files to a
location on the file system for use at run-time.

Module::Install::Share is a Module::Install extension that provides
commands to allow these files to be installed to the applicable
location on disk.

To locate the files after installation so they can be used inside
your module, see this extension's companion module File::ShareDir."

So there we go, I should be fine with this. For the benefit of the
list... how does this work in a portable fashion?

Well, it uses the .../auto subdir which gets created for all
installed modules for stashing files involved in some of the more
esoteric features of perl. The mechanism can be used by any module
for anything though, so File::ShareDir allows a module to load files
which have been stashed there. Pretty neat.

- --
Oliver Gorwits, Network and Telecommunications Group,
Oxford University Computing Services
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla -


More information about the MiltonKeynes-pm mailing list