N
N
nikitad2010-11-22 16:54:23
Perl
nikitad, 2010-11-22 16:54:23

Perl application and configuration files?

Is there a platform independent way to deploy application configuration files? I would like that when executing the commands:

perl Makefile.PL
make && make test && make install

configs were installed in /etc/ (be sure to take into account PREFIX). Since FreeBSD is used as the OS, in principle, make-hooks can be used for this. But it will only work on FreeBSD.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pwlnw, 2010-11-22
@pwlnw

>perl Makefile.PL
Since perl is run before make, use this beautiful platform-independent language to determine the appropriate prefix.
Here is the first example from DBD::Interbase

my $os = $Config::Config{'osname'};
if ($os eq 'MSWin32')
{… and then let's poke around in the registry.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question