Skip to content

Commit

Permalink
argv decode fixed, second attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-mixas committed Feb 1, 2018
1 parent 77cbeda commit 0e4e1dd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/App/NDTools/NDTool.pm
Expand Up @@ -5,18 +5,13 @@ use warnings FATAL => 'all';

use App::NDTools::INC;
use App::NDTools::Slurp qw(s_dump s_load);
use Encode::Locale qw(decode_argv);
use Getopt::Long qw(GetOptionsFromArray :config bundling);
use Log::Log4Cli;
use Struct::Path 0.80 qw(path);

sub VERSION { "n/a" }

BEGIN {
require Encode;
require Encode::Locale;
Encode::Locale::decode_argv(Encode::FB_CROAK());
}

sub arg_opts {
my $self = shift;

Expand Down Expand Up @@ -91,6 +86,7 @@ sub new {
my $self = bless { ARGV => \@_ }, shift;
$self->{OPTS} = $self->defaults();

decode_argv(Encode::FB_CROAK);
unless (GetOptionsFromArray ($self->{ARGV}, $self->arg_opts)) {
$self->usage;
die_fatal "Unsupported opts used", 1;
Expand Down

0 comments on commit 0e4e1dd

Please sign in to comment.