summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog7
-rwxr-xr-xdh_perl12
2 files changed, 16 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index 52ae7f35..8d402a73 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+debhelper (1.2.80) unstable; urgency=low
+
+ * Changed perl version detection.
+ * Changed call to find.
+
+ -- Joey Hess <joeyh@master.debian.org> Thu, 24 Jun 1999 16:48:53 -0700
+
debhelper (1.2.79) unstable; urgency=low
* Added dh_perl by Raphael Hertzog <rhertzog@hrnet.fr>. dh_perl handles
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;