X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=lib%2FApp%2FCodeowners%2FOptions.pm;h=000f8742e1bf8a5648b94672a8ffa49374bab54b;hb=a6b5af4adc7ded62e680b82073781028c2e78158;hp=fcc2eae1be3f2db540a87e4765526d12f83c12e0;hpb=8449a6dac8b4adf0e20bceecbff921d6dc598701;p=chaz%2Fgit-codeowners diff --git a/lib/App/Codeowners/Options.pm b/lib/App/Codeowners/Options.pm index fcc2eae..000f874 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.45'; # 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 <