diff options
author | Guillem Jover <guillem@debian.org> | 2013-01-04 02:51:56 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2013-04-30 15:50:47 +0200 |
commit | d6851023a9ab87e3109fca3f2f9c6b5210575663 (patch) | |
tree | 08783c201e5357d328bed20113fb952367509c82 /scripts/Dpkg/Source | |
parent | 39e0a3b9a62705098253ca4830654b6e9567a743 (diff) | |
download | dpkg-d6851023a9ab87e3109fca3f2f9c6b5210575663.tar.gz |
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
Diffstat (limited to 'scripts/Dpkg/Source')
-rw-r--r-- | scripts/Dpkg/Source/Functions.pm | 6 | ||||
-rw-r--r-- | scripts/Dpkg/Source/Package.pm | 8 | ||||
-rw-r--r-- | scripts/Dpkg/Source/Package/V1.pm | 2 | ||||
-rw-r--r-- | scripts/Dpkg/Source/Package/V2.pm | 2 | ||||
-rw-r--r-- | scripts/Dpkg/Source/Package/V3/bzr.pm | 2 | ||||
-rw-r--r-- | scripts/Dpkg/Source/Package/V3/native.pm | 2 | ||||
-rw-r--r-- | scripts/Dpkg/Source/Patch.pm | 38 | ||||
-rw-r--r-- | scripts/Dpkg/Source/Quilt.pm | 2 |
8 files changed, 31 insertions, 31 deletions
diff --git a/scripts/Dpkg/Source/Functions.pm b/scripts/Dpkg/Source/Functions.pm index d88b896cc..10a9d7af0 100644 --- a/scripts/Dpkg/Source/Functions.pm +++ b/scripts/Dpkg/Source/Functions.pm @@ -97,9 +97,9 @@ sub is_binary($) { # Use diff to check if it's a binary file my $diffgen; my $diff_pid = spawn( - 'exec' => [ 'diff', '-u', '--', '/dev/null', $file ], - 'env' => { LC_ALL => 'C', LANG => 'C', TZ => 'UTC0' }, - 'to_pipe' => \$diffgen + exec => [ 'diff', '-u', '--', '/dev/null', $file ], + env => { LC_ALL => 'C', LANG => 'C', TZ => 'UTC0' }, + to_pipe => \$diffgen, ); my $result = 0; local $_; diff --git a/scripts/Dpkg/Source/Package.pm b/scripts/Dpkg/Source/Package.pm index 3de9afbed..10b29c78d 100644 --- a/scripts/Dpkg/Source/Package.pm +++ b/scripts/Dpkg/Source/Package.pm @@ -148,9 +148,9 @@ sub new { my ($this, %args) = @_; my $class = ref($this) || $this; my $self = { - 'fields' => Dpkg::Control->new(type => CTRL_PKG_SRC), - 'options' => {}, - 'checksums' => Dpkg::Checksums->new(), + fields => Dpkg::Control->new(type => CTRL_PKG_SRC), + options => {}, + checksums => Dpkg::Checksums->new(), }; bless $self, $class; if (exists $args{'options'}) { @@ -360,7 +360,7 @@ sub check_signature { push @exec, $dsc; my ($stdout, $stderr); - spawn('exec' => \@exec, wait_child => 1, nocheck => 1, + spawn(exec => \@exec, wait_child => 1, nocheck => 1, to_string => \$stdout, error_to_string => \$stderr, timeout => 10); if (WIFEXITED($?)) { diff --git a/scripts/Dpkg/Source/Package/V1.pm b/scripts/Dpkg/Source/Package/V1.pm index eae7748ce..f278c5c46 100644 --- a/scripts/Dpkg/Source/Package/V1.pm +++ b/scripts/Dpkg/Source/Package/V1.pm @@ -307,7 +307,7 @@ sub do_build { my $tar = Dpkg::Source::Archive->new(filename => $newtar, compression => compression_guess_from_filename($tarname), compression_level => $self->{'options'}{'comp_level'}); - $tar->create(options => \@tar_ignore, 'chdir' => $tardirbase); + $tar->create(options => \@tar_ignore, chdir => $tardirbase); $tar->add_directory($tardirname); $tar->finish(); rename($newtar, $tarname) || diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm index c05d9895d..ee9687386 100644 --- a/scripts/Dpkg/Source/Package/V2.pm +++ b/scripts/Dpkg/Source/Package/V2.pm @@ -530,7 +530,7 @@ sub do_build { my $debianfile = "$basenamerev.debian.tar." . $self->{'options'}{'comp_ext'}; info(_g("building %s in %s"), $sourcepackage, $debianfile); my $tar = Dpkg::Source::Archive->new(filename => $debianfile); - $tar->create(options => \@tar_ignore, 'chdir' => $dir); + $tar->create(options => \@tar_ignore, chdir => $dir); $tar->add_directory("debian"); foreach my $binary ($binaryfiles->get_seen_binaries()) { $tar->add_file($binary) unless $binary =~ m{^debian/}; diff --git a/scripts/Dpkg/Source/Package/V3/bzr.pm b/scripts/Dpkg/Source/Package/V3/bzr.pm index 08bbd13af..bba97fb21 100644 --- a/scripts/Dpkg/Source/Package/V3/bzr.pm +++ b/scripts/Dpkg/Source/Package/V3/bzr.pm @@ -155,7 +155,7 @@ sub do_build { my $tar = Dpkg::Source::Archive->new(filename => $debianfile, compression => $self->{'options'}{'compression'}, compression_level => $self->{'options'}{'comp_level'}); - $tar->create('chdir' => $tmp); + $tar->create(chdir => $tmp); $tar->add_directory($dirname); $tar->finish(); diff --git a/scripts/Dpkg/Source/Package/V3/native.pm b/scripts/Dpkg/Source/Package/V3/native.pm index 211e8fe6a..de0b43c5f 100644 --- a/scripts/Dpkg/Source/Package/V3/native.pm +++ b/scripts/Dpkg/Source/Package/V3/native.pm @@ -91,7 +91,7 @@ sub do_build { my $tar = Dpkg::Source::Archive->new(filename => $newtar, compression => compression_guess_from_filename($tarname), compression_level => $self->{'options'}{'comp_level'}); - $tar->create(options => \@tar_ignore, 'chdir' => $dirbase); + $tar->create(options => \@tar_ignore, chdir => $dirbase); $tar->add_directory($dirname); $tar->finish(); rename($newtar, $tarname) || diff --git a/scripts/Dpkg/Source/Patch.pm b/scripts/Dpkg/Source/Patch.pm index 2aa11ab1c..a43983bb5 100644 --- a/scripts/Dpkg/Source/Patch.pm +++ b/scripts/Dpkg/Source/Patch.pm @@ -100,9 +100,9 @@ sub add_diff_file { # Generate diff my $diffgen; my $diff_pid = spawn( - 'exec' => [ 'diff', '-u', @options, '--', $old, $new ], - 'env' => { LC_ALL => 'C', LANG => 'C', TZ => 'UTC0' }, - 'to_pipe' => \$diffgen + exec => [ 'diff', '-u', @options, '--', $old, $new ], + env => { LC_ALL => 'C', LANG => 'C', TZ => 'UTC0' }, + to_pipe => \$diffgen, ); # Check diff and write it in patch file my $difflinefound = 0; @@ -538,15 +538,15 @@ sub apply { $self->ensure_open("r"); my ($stdout, $stderr) = ('', ''); spawn( - 'exec' => [ 'patch', @{$opts{"options"}} ], - 'chdir' => $destdir, - 'env' => { LC_ALL => 'C', LANG => 'C' }, - 'delete_env' => [ 'POSIXLY_CORRECT' ], # ensure expected patch behaviour - 'wait_child' => 1, - 'nocheck' => 1, - 'from_handle' => $self->get_filehandle(), - 'to_string' => \$stdout, - 'error_to_string' => \$stderr, + exec => [ 'patch', @{$opts{"options"}} ], + chdir => $destdir, + env => { LC_ALL => 'C', LANG => 'C' }, + delete_env => [ 'POSIXLY_CORRECT' ], # ensure expected patch behaviour + wait_child => 1, + nocheck => 1, + from_handle => $self->get_filehandle(), + to_string => \$stdout, + error_to_string => \$stderr, ); if ($?) { print STDOUT $stdout; @@ -589,13 +589,13 @@ sub check_apply { $self->ensure_open("r"); my $error; my $patch_pid = spawn( - 'exec' => [ 'patch', @{$opts{"options"}} ], - 'chdir' => $destdir, - 'env' => { LC_ALL => 'C', LANG => 'C' }, - 'delete_env' => [ 'POSIXLY_CORRECT' ], # ensure expected patch behaviour - 'from_handle' => $self->get_filehandle(), - 'to_file' => '/dev/null', - 'error_to_file' => '/dev/null', + exec => [ 'patch', @{$opts{"options"}} ], + chdir => $destdir, + env => { LC_ALL => 'C', LANG => 'C' }, + delete_env => [ 'POSIXLY_CORRECT' ], # ensure expected patch behaviour + from_handle => $self->get_filehandle(), + to_file => '/dev/null', + error_to_file => '/dev/null', ); wait_child($patch_pid, nocheck => 1); my $exit = WEXITSTATUS($?); diff --git a/scripts/Dpkg/Source/Quilt.pm b/scripts/Dpkg/Source/Quilt.pm index f5304fc7b..2edb14824 100644 --- a/scripts/Dpkg/Source/Quilt.pm +++ b/scripts/Dpkg/Source/Quilt.pm @@ -37,7 +37,7 @@ sub new { my $class = ref($this) || $this; my $self = { - 'dir' => $dir, + dir => $dir, }; bless $self, $class; |