From a90fe55a4589d9c3fb1d23924e7b9ddf032be068 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Wed, 12 Sep 2012 01:25:59 +0800 Subject: [PATCH] Bug 8742 - Example uses perl 5.8 in Makefile.PL Changed hardcoded path for a programmatic one. Basing it on: grep /\/usr\/share\/perl\//, @INC; And doing a: push @version, ('/usr/share/perl/5.10') if !$version[0]; For a reasonable default otherwise. No more references to /usr/share/perl/5.8 hardcoded into the output. --- Makefile.PL | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.PL b/Makefile.PL index 46a3524..b6ca640 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1358,6 +1358,8 @@ sub _add_destdir { sub display_configuration { my $config = shift; my $dirmap = shift; + my @version = grep /\/usr\/share\/perl\//, @INC; + push @version, ('/usr/share/perl/5.10') if !$version[0]; print "\n\nKoha will be installed with the following configuration parameters:\n\n"; foreach my $key (sort keys %$config) { print sprintf("%-25.25s%s\n", $key, $config->{$key}); @@ -1370,7 +1372,7 @@ sub display_configuration { print "\n\nTo change any configuration setting, please run\n"; print "perl Makefile.PL again. To override one of the target\n"; print "directories, you can do so on the command line like this:\n"; - print "\nperl Makefile.PL PERL_MODULE_DIR=/usr/share/perl/5.8\n\n"; + print "\nperl Makefile.PL PERL_MODULE_DIR=$version[0]\n\n"; print "You can also set different default values for parameters\n"; print "or override directory locations by using environment variables.\n"; print "\nFor example:\n\n"; -- 1.7.9.5