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