git.shiar.nl
/
barcat.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
inline podexit code for --help, alias to -?
[barcat.git]
/
barcat
diff --git
a/barcat
b/barcat
index a443942c5664b2ac1facae0379beab2ef83063e1..bac7ebd4d11adc5893b49d9a5e584c403080b76b 100755
(executable)
--- a/
barcat
+++ b/
barcat
@@
-9,10
+9,6
@@
use experimental qw( lexical_subs );
our $VERSION = '1.05';
use Getopt::Long '2.33', qw( :config gnu_getopt );
our $VERSION = '1.05';
use Getopt::Long '2.33', qw( :config gnu_getopt );
-sub podexit {
- require Pod::Usage;
- Pod::Usage::pod2usage(-exitval => 0, -perldocopt => '-oman', @_);
-}
my %opt;
GetOptions(\%opt,
'color|c!',
my %opt;
GetOptions(\%opt,
'color|c!',
@@
-69,7
+65,12
@@
GetOptions(\%opt,
print $contents;
exit;
},
print $contents;
exit;
},
- 'help' => sub { podexit(-verbose => 2) },
+ 'help|?' => sub {
+ require Pod::Usage;
+ Pod::Usage::pod2usage(
+ -exitval => 0, -perldocopt => '-oman', -verbose => 2,
+ );
+ },
) or exit 64; # EX_USAGE
$opt{width} ||= $ENV{COLUMNS} || 80;
) or exit 64; # EX_USAGE
$opt{width} ||= $ENV{COLUMNS} || 80;