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