From d6851023a9ab87e3109fca3f2f9c6b5210575663 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Fri, 4 Jan 2013 02:51:56 +0100 Subject: Do not quote simple identifier hash keys in initializations Do not quote the keys for any hash which will always use simple identifiers, as that is taken care of by the => operator. So this does not apply to overload pragmas, version operators, field names, substvars, command line options or filenames. Addresses ValuesAndExpressions::ProhibitInterpolationOfLiterals. Warned-by: perlcritic --- scripts/Dpkg/Control/Hash.pm | 10 +++++----- scripts/Dpkg/Control/Info.pm | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'scripts/Dpkg/Control') diff --git a/scripts/Dpkg/Control/Hash.pm b/scripts/Dpkg/Control/Hash.pm index 38ed1edc7..6084d3a97 100644 --- a/scripts/Dpkg/Control/Hash.pm +++ b/scripts/Dpkg/Control/Hash.pm @@ -103,11 +103,11 @@ sub new { # Object is a scalar reference and not a hash ref to avoid # infinite recursion due to overloading hash-derefencing my $self = \{ - 'in_order' => [], - 'out_order' => [], - 'allow_pgp' => 0, - 'allow_duplicate' => 0, - 'drop_empty' => 0, + in_order => [], + out_order => [], + allow_pgp => 0, + allow_duplicate => 0, + drop_empty => 0, }; bless $self, $class; diff --git a/scripts/Dpkg/Control/Info.pm b/scripts/Dpkg/Control/Info.pm index e88bcb8f0..8e28446b0 100644 --- a/scripts/Dpkg/Control/Info.pm +++ b/scripts/Dpkg/Control/Info.pm @@ -55,8 +55,8 @@ sub new { my ($this, $arg) = @_; my $class = ref($this) || $this; my $self = { - 'source' => undef, - 'packages' => [], + source => undef, + packages => [], }; bless $self, $class; if ($arg) { -- cgit v1.2.3