The following commit has been merged in the master branch:
commit 8d9cf6246f2a307a34d8db16a7c8ea4179abdea9
Author: Guillem Jover <[email protected]>
Date:   Thu Jan 3 01:21:12 2013 +0100

    Dpkg::Deps: Use braces for multiline regexp
    
    Fixes RegularExpressions::RequireBracesForMultiline.
    
    Warned-by: perlcritic

diff --git a/scripts/Dpkg/Deps.pm b/scripts/Dpkg/Deps.pm
index fe26a6d..9a268f7 100644
--- a/scripts/Dpkg/Deps.pm
+++ b/scripts/Dpkg/Deps.pm
@@ -585,7 +585,7 @@ sub parse {
 sub parse_string {
     my ($self, $dep) = @_;
     return if not $dep =~
-            /^\s*                           # skip leading whitespace
+           m{^\s*                           # skip leading whitespace
               ([a-zA-Z0-9][a-zA-Z0-9+.-]*)  # package name
               (?:                           # start of optional part
                 :                           # colon for architecture
@@ -603,7 +603,7 @@ sub parse_string {
                 \s* \]                      # closing bracket
               )?                            # end of optional architecture
              \s*$                          # trailing spaces at end
-            /x;
+            }x;
     if (defined($2)) {
        return if $2 eq 'native' and not $self->{build_dep};
        $self->{archqual} = $2;
diff --git a/test/100_critic.t b/test/100_critic.t
index 87b0f05..8f586f2 100644
--- a/test/100_critic.t
+++ b/test/100_critic.t
@@ -67,6 +67,7 @@ my @policies = qw(
     Modules::RequireExplicitPackage
     Modules::RequireFilenameMatchesPackage
     Objects::ProhibitIndirectSyntax
+    RegularExpressions::RequireBracesForMultiline
     Subroutines::ProhibitExplicitReturnUndef
     Subroutines::ProhibitNestedSubs
     Subroutines::ProhibitReturnSort

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to