|We don't bite newbies here... much|
How to install INI file cross platform with Makefile.PL?by mrdvt92 (Acolyte)
|on Sep 04, 2011 at 20:18 UTC||Need Help??|
mrdvt92 has asked for the
wisdom of the Perl Monks concerning the following question:
I have a package that uses "profiles" to connect to databases, web services and file systems. A profile is "Production", "Alpha", "Beta" etc... There is a master INI file that maps the profiles to their correct databases and services.
I would like to be able to add this INI file in my distribution so that it is installed by the normal "perl Makefile.PL;make;make install" process so that we can build RPMs and PPMs that have the INI file.
I've done some research and it appears that INI files should be in /etc (sysconfdir) on Linux-like systems and should be in the Windows folder on Windows-like systems. These paths are easy enough to get from Sys::Path->sysconfdir and Win32::GetFolderPath(Win32::CSIDL_WINDOWS). Note: I do not think the INI file should go in c:\Perl\etc (Sys::Path->sysconfdir in Windows) since it is also used by non-Perl applications.
Does anyone know how to get this to work?
In my research, it appears that neither Module::Install nor ExtUtils::MakeMaker support this out of the box but there are 100s of options.
This package Module::Build::SysPath seams to be the closest to what I need but, it puts the Windows INI file in what I consider the "wrong" path in Win32.