From 02bf15728725717941050cab1df7c802fd197e1e Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Sun, 9 Sep 2012 15:24:47 +0800 Subject: [PATCH] Bug 8742 - Example uses perl 5.8 in Makefile.PL Content-Type: text/plain; charset="utf-8" Changed hardcoded /usr/share/perl/5.8 message to be based on: my @version = grep /\/usr\/share\/perl\//, @INC; By doing a push @version, ('/usr/share/perl/5.10') if !$version[0]; If inexplicably the grep fails or @INC is empty, then there is a reasonable default value. --- Makefile.PL | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.PL b/Makefile.PL index 9ac1474..b110818 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1349,6 +1349,7 @@ sub _add_destdir { sub display_configuration { my $config = shift; my $dirmap = shift; + my @version = grep /\/usr\/share\/perl\//, @INC || ('/usr/share/perl/5.10'); 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}); @@ -1361,7 +1362,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