]> Dogcows Code - chaz/git-codeowners/blobdiff - lib/App/Codeowners/Options.pm
Version 0.49
[chaz/git-codeowners] / lib / App / Codeowners / Options.pm
index 0cfdf4bc8e4f6d27411af769681f57a25fc00deb..db7261e0a2bf87eab8f8e1902df65277f4efe315 100644 (file)
@@ -5,10 +5,11 @@ use v5.10.1;
 use warnings;
 use strict;
 
+use Encode qw(decode);
 use Getopt::Long 2.39 ();
 use Path::Tiny;
 
-our $VERSION = '0.48'; # VERSION
+our $VERSION = '0.49'; # VERSION
 
 sub pod2usage {
     eval { require Pod::Usage };
@@ -82,6 +83,9 @@ sub new {
     my $class = shift;
     my @args  = @_;
 
+    # assume UTF-8 args if non-ASCII
+    @args = map { decode('UTF-8', $_) } @args if grep { /\P{ASCII}/ } @args;
+
     my $self = bless {}, $class;
 
     my @args_copy = @args;
@@ -299,7 +303,7 @@ App::Codeowners::Options - Getopt and shell completion for App::Codeowners
 
 =head1 VERSION
 
-version 0.48
+version 0.49
 
 =head1 METHODS
 
This page took 0.021755 seconds and 4 git commands to generate.