Skip to content

Commit

Permalink
fix failures with some Getopt::Long versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-mixas committed Mar 1, 2018
1 parent c4d0db7 commit a3d746d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/App/NDTools/NDProc.pm
Expand Up @@ -4,7 +4,7 @@ use strict;
use warnings FATAL => 'all';
use parent 'App::NDTools::NDTool';

use Getopt::Long qw(:config bundling pass_through);
use Getopt::Long qw(GetOptionsFromArray :config bundling pass_through);
use Log::Log4Cli;
use Module::Find qw(findsubmod);
use App::NDTools::Slurp qw(s_decode s_dump s_encode);
Expand All @@ -13,7 +13,7 @@ use Struct::Diff 0.94 qw(diff split_diff);
use Struct::Path 0.80 qw(path);
use Struct::Path::PerlStyle 0.80 qw(str2path);

our $VERSION = '0.24';
our $VERSION = '0.25';

sub arg_opts {
my $self = shift;
Expand Down Expand Up @@ -133,10 +133,8 @@ sub exec {
'version|V' => sub { print $self->VERSION . "\n"; exit 0 },
);

my $p = Getopt::Long::Parser->new();
$p->configure('nopass_through'); # just to be sure
unless ($p->getoptionsfromarray($self->{ARGV}, @rest_opts)) {

Getopt::Long::Configure('nopass_through');
unless (GetOptionsFromArray($self->{ARGV}, @rest_opts)) {
$self->usage;
die_fatal "Unsupported opts passed", 1;
}
Expand Down

0 comments on commit a3d746d

Please sign in to comment.