summaryrefslogtreecommitdiff
path: root/dh_perl
diff options
context:
space:
mode:
Diffstat (limited to 'dh_perl')
-rwxr-xr-xdh_perl4
1 files changed, 3 insertions, 1 deletions
diff --git a/dh_perl b/dh_perl
index 1220e083..a3372d5a 100755
--- a/dh_perl
+++ b/dh_perl
@@ -13,7 +13,9 @@ my $lib_dir = 'usr/lib/perl5';
# it points to, otherwise query perl directly.
my $version=sprintf("%.3f", $]);
if (defined $ENV{PERL}) {
- $version=`$ENV{PERL} -e 'printf "%.3f", \$]'`;
+ # This is pretty gawd-aweful ugly, because we need "5.00[45]"
+ # and "5.[6789]" to be returned.
+ $version=`$ENV{PERL} -e '\$] < 5.006 ? printf "%.3f", \$] : printf "%vd\n", substr \$^V, 0, -1'`;
}
# Cleaning the paths given on the command line