summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/Dpkg/Deps.pm4
-rw-r--r--test/100_critic.t1
2 files changed, 3 insertions, 2 deletions
diff --git a/scripts/Dpkg/Deps.pm b/scripts/Dpkg/Deps.pm
index fe26a6d59..9a268f720 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 87b0f050e..8f586f20e 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