[PATCH] Updated extract_name_ver_from_makefile to handle M::I recommended syntax. * This patch only fixes extraction of names. * Version extraction tweaks not made in this commit.

Paul Fenwick pjf at perltraining.com.au
Tue Nov 25 01:26:50 UTC 2008


---
 dh-make-perl |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/dh-make-perl b/dh-make-perl
index 834d708..9833458 100755
--- a/dh-make-perl
+++ b/dh-make-perl
@@ -607,13 +607,16 @@ sub extract_name_ver_from_makefile {
         $name = $4;
     }
     elsif (
-        $file =~ /name
-		 \s*
-		 \(
-		     ([\'\"]?)
-		         (\S+)
-		     \1
-		 \);/xs
+        $file =~ m{
+			name
+			 \s*
+			 \(?			# Optional open quote
+			     ([\'\"]?)
+				 (\S+)		# Quoted name
+			     \1
+			 \)?			# Optional close quote
+			 \s*;
+		 }xs
         )
     {
 
@@ -857,6 +860,7 @@ sub extract_depends {
     # fall back to Module::Depends.
 
     eval { %dep_hash = run_depends( 'Module::Depends::Intrusive', $dir ); };
+
     if ($@) {
         warn '=' x 70, "\n";
         warn "First attempt (Module::Depends::Intrusive) at a dependency\n"
-- 
1.5.5.GIT


--------------020905020405070205070900--





More information about the pkg-perl-maintainers mailing list