link-checker commit: Use Encode::Locale for decoding command line arguments.

changeset:   383:371331eccf4d
tag:         tip
user:        Ville Skyttä <ville.skytta@iki.fi>
date:        Mon Mar 14 10:53:30 2011 +0200
files:       META.yml Makefile.PL bin/checklink
description:
Use Encode::Locale for decoding command line arguments.


diff -r 17918e643619 -r 371331eccf4d META.yml
--- a/META.yml	Mon Mar 14 10:52:10 2011 +0200
+++ b/META.yml	Mon Mar 14 10:53:30 2011 +0200
@@ -20,6 +20,7 @@
     CSS::DOM::Style:      0
     CSS::DOM::Util:       0
     Encode:               0
+    Encode::Locale:       0
     File::Spec:           0
     Getopt::Long:         2.17
     HTML::Entities:       0
@@ -29,7 +30,6 @@
     HTTP::Message:        5.827
     HTTP::Request:        0
     HTTP::Response:       1.50
-    I18N::Langinfo:       0
     Locale::Country:      0
     Locale::Language:     0
     LWP::RobotUA:         1.19
diff -r 17918e643619 -r 371331eccf4d Makefile.PL
--- a/Makefile.PL	Mon Mar 14 10:52:10 2011 +0200
+++ b/Makefile.PL	Mon Mar 14 10:53:30 2011 +0200
@@ -50,7 +50,7 @@
         Locale::Language => 0,
 
         # Optional, used when decoding arguments in command line mode:
-        I18N::Langinfo => 0,
+        Encode::Locale => 0,
 
         # Optional, but required in CGI mode:
         CGI         => 0,
diff -r 17918e643619 -r 371331eccf4d bin/checklink
--- a/bin/checklink	Mon Mar 14 10:52:10 2011 +0200
+++ b/bin/checklink	Mon Mar 14 10:53:30 2011 +0200
@@ -697,11 +697,8 @@
 
 sub parse_arguments ()
 {
-    eval {
-        require I18N::Langinfo;
-        my $encoding = I18N::Langinfo::langinfo(I18N::Langinfo::CODESET());
-        @ARGV = map { Encode::decode($encoding, $_) } @ARGV;
-    };
+    require Encode::Locale;
+    Encode::Locale::decode_argv();
 
     require Getopt::Long;
     Getopt::Long->require_version(2.17);

Received on Monday, 14 March 2011 08:54:10 UTC