override version option to only show main program
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 17 Sep 2019 12:25:58 +0000 (14:25 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Thu, 12 Sep 2019 15:48:11 +0000 (17:48 +0200)
barcat
t/t0001-version_--version.out

diff --git a/barcat b/barcat
index 36461a17d7a53c7d0d71f631ef5bd1af180efbbd..7da22597daea388d539e81b883f56de60bfac278 100755 (executable)
--- a/barcat
+++ b/barcat
@@ -53,6 +53,10 @@ GetOptions(\%opt,
        'signal-stat=s',
        'unmodified|u!',
        'width|w=i',
+       'version' => sub {
+               say "barcat version $VERSION";
+               exit;
+       },
        'usage|h' => sub {
                local $/;
                my $pod = readline *DATA;
index 8f670b5b9f7ea5451f9c47bf87a9154cf5d7fb33..e177fbbd2619282f280eb1825c49c4264a458f85 100644 (file)
@@ -1,2 +1 @@
-./barcat version 1.05
-(Getopt::Long::GetOptions version 2.48; Perl version 5.24.1)
+barcat version 1.06