diff options
author | Guillem Jover <guillem@debian.org> | 2012-12-31 21:43:39 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2013-05-04 19:03:13 +0200 |
commit | 6a73e3078b01a71d4a6ea90c85da16523ed56f1d (patch) | |
tree | 4cc7a210e7e851395f7ba4989e3aac4aa9d32710 /test/100_critic.t | |
parent | 62bc788a45e4a641c28ca9c8c5b9bb08f29faed8 (diff) | |
download | dpkg-6a73e3078b01a71d4a6ea90c85da16523ed56f1d.tar.gz |
Do not use double-quotes on strings that do not need interpolation
Using double-quotes imposes a small performance penalty as the perl
parser needs to check if any interpolation is needed. Use double-quotes
only when the string contains single-quotes. Ideally we'd use
double-quotes too for escaped meta-characters that might otherwise be
confusing to immediately see if they need interpolation or not, but the
policy does not (currently) allow to ignore these.
Fixes ValuesAndExpressions::ProhibitInterpolationOfLiterals.
Warned-by: perlcritic
Diffstat (limited to 'test/100_critic.t')
-rw-r--r-- | test/100_critic.t | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/100_critic.t b/test/100_critic.t index cae188f0b..9b3e9e1bd 100644 --- a/test/100_critic.t +++ b/test/100_critic.t @@ -69,6 +69,7 @@ my @policies = qw( TestingAndDebugging::RequireUseStrict TestingAndDebugging::RequireUseWarnings ValuesAndExpressions::ProhibitComplexVersion + ValuesAndExpressions::ProhibitInterpolationOfLiterals ValuesAndExpressions::ProhibitLongChainsOfMethodCalls ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator |