summaryrefslogtreecommitdiff
path: root/dh_perl
diff options
context:
space:
mode:
authorjoey <joey>2000-11-07 23:56:05 +0000
committerjoey <joey>2000-11-07 23:56:05 +0000
commit5615612cd688bb01f13b9ea966b4c8d801f03449 (patch)
tree038a981fe18d45e4352ca479960d090a798274da /dh_perl
parent1d9a72073d0f54f96be2404929a452cdf90c2f6b (diff)
r384: ugh
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 1220e08..a3372d5 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