X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=lib%2FApp%2FCodeowners%2FOptions.pm;h=153376fc3a1bb0cb7efe9c16e28f96ec408c3749;hb=4a8ff75b5b2f7bfaadc936757dc2a0f5de3c57e3;hp=fcc2eae1be3f2db540a87e4765526d12f83c12e0;hpb=8449a6dac8b4adf0e20bceecbff921d6dc598701;p=chaz%2Fgit-codeowners diff --git a/lib/App/Codeowners/Options.pm b/lib/App/Codeowners/Options.pm index fcc2eae..153376f 100644 --- a/lib/App/Codeowners/Options.pm +++ b/lib/App/Codeowners/Options.pm @@ -1,14 +1,35 @@ package App::Codeowners::Options; # ABSTRACT: Getopt and shell completion for App::Codeowners +use v5.10.1; use warnings; use strict; use Getopt::Long 2.39 (); use Path::Tiny; -use Pod::Usage; -our $VERSION = '0.43'; # VERSION +our $VERSION = '0.47'; # VERSION + +sub pod2usage { + eval { require Pod::Usage }; + if ($@) { + my $ref = $VERSION eq '9999.999' ? 'master' : "v$VERSION"; + my $exit = (@_ == 1 && $_[0] =~ /^\d+$/ && $_[0]) // + (@_ % 2 == 0 && {@_}->{'-exitval'}) // 2; + print STDERR <