shipping support data with CPAN dists - SOLVED

Oliver Gorwits oliver.gorwits at oucs.ox.ac.uk
Sat Apr 25 15:45:38 PDT 2009


-----BEGIN PGP SIGNED MESSAGE-----
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJ85KS2NPq7pwWBt4RAlpWAKCxGNdXCdDs1McIdfxVZLpzecFQwgCePqyS
WJ8PB3pzdUtSGzTQE8fFi/Q=
=a+16
-----END PGP SIGNATURE-----


More information about the MiltonKeynes-pm mailing list