From 0f9b0ee1c7845a46f838a623b695ee8434854740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20H=C3=A6gland?= Date: Sat, 3 Aug 2024 11:42:03 +0200 Subject: [PATCH] Use old version of s// operator --- Build.PL | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Build.PL b/Build.PL index 73b40d7..7346238 100644 --- a/Build.PL +++ b/Build.PL @@ -340,7 +340,8 @@ sub check_alien_gsl_share_dir { my $libs = Math::GSL::Alien->libs; my $lib_dir = $libs =~ m{-L(\S+)} ? $1 : ''; if ($lib_dir) { - my $bin_dir = $lib_dir =~ s{/lib}{/bin}r; + # For compatibility with perl < 5.14 we can't use s{/lib}{/bin}r + (my $bin_dir = $lib_dir) =~ s{/lib}{/bin}; if (-d $bin_dir) { $ENV{PATH} .= ":$bin_dir"; }