David Golden wrote:
On Fri, May 21, 2010 at 3:54 AM, David Lee <[email protected]> wrote:
[...]
But I can't see how to specify the "config files" and "data;state" aspects.
Any thoughts on what I have missed? Or hints or good-practice-tips on how
to specify to MM the application's config and state directories?
Two separate issues: (1) telling your application where to put things
and (2) telling MakeMaker where to put things.
Many people seem to be finding that it's easier to use File::ShareDir
to access non-code config or data files in a known location within the
perl installation hierarchy. This frees you from having to worry
about whether there is an 'etc' or 'var' directory on a user's system.
E.g. on Windows or for a non-root user on a shared hosting
environment.
[...]
Thanks for the reply, and my apologies for delaying in acknowledging it.
This is an application which just so happens to be in Perl at the
moment. It could have been in other languages. As far as the users are
concerned their access points will be thin binary wrappers in their
$PATH ("/bin" or similar), not anything perl-ish (the fact it is in perl
is merely an internal implementation detail for me as its coder, and for
the app. administrator who installs it as "just another CPAN module").
Likewise, from the perspective of the app. admin. (and his/her
end-users) the config and data/state files for this application have
nothing perl-specific about them. (OK, they'll be read/written by the
heart of the application which just so happens to be in perl.)
So in this context, putting config files (read-only), and especially
putting data/state files (read/write), into the perl installation
hierarchy seems inappropriate; the natural mindset for the application
would be the traditional UNIX "/etc" and "/var" locations, plus or minus
considerations such as "Linux Standard Base" (LSB) conventions.
Hence my wondering whether, just as "INSTALLBIN" (and similar) default
to LSB-like conventions and perspective (rather than within the perl
installation hierarchy), there might be analogous "INSTALL*" variables
for LSB-like config ("/etc"-ish) and data/state ("/var"-ish) locations.
If there aren't such variables, then I'm happy to hack it. (But I'd
rather use established routes where possible.)
If I'm heading in the wrong direction, do let me know!
--
: David Lee
: ECMWF (Data Handling System)
: Shinfield Park
: Reading RG2 9AX
: Berkshire
:
: tel: +44-118-9499 362
: email: [email protected]