summaryrefslogtreecommitdiff
path: root/dh_perl
diff options
context:
space:
mode:
authorjoey <joey>1999-08-17 05:15:51 +0000
committerjoey <joey>1999-08-17 05:15:51 +0000
commite66a391f8008517c4c31873e9279a265aae0f180 (patch)
tree382a69f5da6467a555f997c570434b70222f09c2 /dh_perl
parent1245fb187e6f19f0a4c93d2d67fd13632e97a0e6 (diff)
downloaddebhelper-e66a391f8008517c4c31873e9279a265aae0f180.tar.gz
r220: Initial Import
Diffstat (limited to 'dh_perl')
-rwxr-xr-xdh_perl12
1 files changed, 9 insertions, 3 deletions
diff --git a/dh_perl b/dh_perl
index 4136414f..c8aa6a01 100755
--- a/dh_perl
+++ b/dh_perl
@@ -7,8 +7,14 @@ BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
use Dh_Lib;
init();
-my $perl = $ENV{'PERL'} || '/usr/bin/perl';
-$version=sprintf("%.3f", $]);
+my $perl = $ENV{PERL} || '/usr/bin/perl';
+
+# Figure out the version of perl. If $ENV{PERL} is set, query the perl binary
+# it points to, otherwise query perl directly.
+my $version=sprintf("%.3f", $]);
+if (defined $ENV{PERL}) {
+ $version=`$ENV{PERL} -e 'printf "%.3f", \$]'`;
+}
foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
$TMP=tmpdir($PACKAGE);
@@ -21,7 +27,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
# Look for perl modules and check where they are installed
if (-d "$TMP/usr/lib/perl5") {
- foreach $file (split(/\n/,`find $TMP/usr/lib/perl5 -type f -name "*.pm"`)) {
+ foreach $file (split(/\n/,`find $TMP/usr/lib/perl5 -type f \\( -name "*.pm" -or -name "*.so" \\)`)) {
$found++;
if ($file =~ m<^$TMP/usr/lib/perl5/(\d\.\d{3})/([^/]+)/>) {
$v = $1;