summaryrefslogtreecommitdiff
path: root/chronic
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-04-02 15:22:55 -0400
committerJoey Hess <joeyh@joeyh.name>2016-04-02 15:22:55 -0400
commit411d6d3c6a8912c83cfc8a77747d4e68ed66cb4f (patch)
treece6147a233029a3045d54051f0a83c98bbe952ed /chronic
parent5394ef715c4550a627bb2b212de55008f58302b1 (diff)
downloadmoreutils-411d6d3c6a8912c83cfc8a77747d4e68ed66cb4f.tar.gz
style cleanup
Diffstat (limited to 'chronic')
-rwxr-xr-xchronic13
1 files changed, 6 insertions, 7 deletions
diff --git a/chronic b/chronic
index e7817e7..7cfc2d6 100755
--- a/chronic
+++ b/chronic
@@ -53,11 +53,10 @@ use warnings;
use strict;
use IPC::Run qw( start pump finish timeout );
use Getopt::Std;
-use feature qw(say);
-our($opt_e, $opt_v);
-$opt_e = $opt_v = 0;
-getopts('ev');
+our $opt_e = 0;
+our $opt_v = 0;
+getopts('ev'); # only looks at options before the COMMAND
if (! @ARGV) {
die "usage: chronic COMMAND...\n";
@@ -85,9 +84,9 @@ else {
}
sub showout {
- $opt_v && print "STDOUT:\n";
+ print "STDOUT:\n" if $opt_v;
print STDOUT $out;
- $opt_v && print "\nSTDERR:\n";
+ print "\nSTDERR:\n" if $opt_v;
print STDERR $err;
- $opt_v && print "\nRETVAL: ".($ret >> 8)."\n";
+ print "\nRETVAL: ".($ret >> 8)."\n" if $opt_v;
}