r27298 - /trunk/dh-make-perl/dh-make-perl

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Wed Nov 26 12:22:13 UTC 2008


Author: dmn
Date: Wed Nov 26 12:22:09 2008
New Revision: 27298

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=27298
Log:
run_depends: return a hashref instead of plain hash

Modified:
    trunk/dh-make-perl/dh-make-perl

Modified: trunk/dh-make-perl/dh-make-perl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/dh-make-perl/dh-make-perl?rev=27298&op=diff
==============================================================================
--- trunk/dh-make-perl/dh-make-perl (original)
+++ trunk/dh-make-perl/dh-make-perl Wed Nov 26 12:22:09 2008
@@ -1091,15 +1091,12 @@
     $mod_dep->dist_dir($dir);
     $mod_dep->find_modules();
 
-    my %dep_hash = %{
-        $build_deps
-        ? $mod_dep->build_requires 
-        : $mod_dep->requires
-    };
+    my $deps = $build_deps ? $mod_dep->build_requires : $mod_dep->requires;
 
     my $error = $mod_dep->error();
     die "Error: $error\n" if $error;
-    return %dep_hash;
+
+    return $deps;
 }
 
 # filter @deps to contain only one instance of each package
@@ -1200,7 +1197,7 @@
     my $dir  = shift;
     my $apt_contents = shift;
     my $build_deps = shift;
-    my (%dep_hash);
+    my ($dep_hash);
     local @INC = ( $dir, @INC );
 
     $dir .= '/' unless $dir =~ m/\/$/;
@@ -1208,7 +1205,7 @@
     # try Module::Depends, but if that fails then
     # fall back to Module::Depends::Intrusive.
 
-    eval { %dep_hash = run_depends( 'Module::Depends', $dir, $build_deps ); };
+    eval { $dep_hash = run_depends( 'Module::Depends', $dir, $build_deps ); };
     if ($@) {
         warn '=' x 70, "\n";
         warn "First attempt (Module::Depends) at a dependency\n"
@@ -1217,7 +1214,7 @@
         warn '=' x 70, "\n";
 
         eval {
-            %dep_hash = run_depends(
+            $dep_hash = run_depends(
                 'Module::Depends::Intrusive', $dir, $build_deps );
         };
         if ($@) {
@@ -1237,7 +1234,7 @@
         }
     }
 
-    my( $debs, $missing ) = find_debs_for_modules( \%dep_hash, $apt_contents );
+    my( $debs, $missing ) = find_debs_for_modules( $dep_hash, $apt_contents );
 
     print "\n";
     print "Needs the following debian packages: "




More information about the Pkg-perl-cvs-commits mailing list