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/Patch.pm | |
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/Patch.pm')
-rw-r--r-- | scripts/Dpkg/Source/Patch.pm | 38 |
1 files changed, 19 insertions, 19 deletions
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($?); |