Some doco tweaks for I18N::LangTags::Detect

--OgqxwSJOaUobr8KG
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

I had to use I18N::LangTags::Detect last night and when I saw in the
doco that it looks for "several environment variables, including [list
of variables]" I thought "OK, so what other variables are involved that
I'll need to control from my tests?" and had to read the source. One of
the patches attached to this message updates the doco to make it clear
exactly which variables it looks at.

While reading the source I also found an undocumented environment
variable, so there's a little patch for that too.

-- 
David Cantrell

--OgqxwSJOaUobr8KG
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="0001-document-IGNORE_WIN32_LOCALE.patch"

From e78ac74c16f4a9611ce1dc2c170ee601f2dd2132 Mon Sep 17 00:00:00 2001
From: David Cantrell <david@cantrell.org.uk>
Date: Thu, 11 Jul 2019 12:03:20 +0100
Subject: [PATCH 1/3] document IGNORE_WIN32_LOCALE

---
 dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm b/dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm
index 16b91db336..6d0fdb7abf 100644
--- a/dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm
+++ b/dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm
@@ -207,7 +207,9 @@ This module looks for several environment variables, including
 REQUEST_METHOD, HTTP_ACCEPT_LANGUAGE,
 LANGUAGE, LC_ALL, LC_MESSAGES, and LANG.
 
-It will also use the L<Win32::Locale> module, if it's installed.
+It will also use the L<Win32::Locale> module, if it's installed
+and IGNORE_WIN32_LOCALE is not set to a true value in the
+environment.
 
 
 =head1 SEE ALSO
-- 
2.22.0


--OgqxwSJOaUobr8KG
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="0002-minor-clarification-don-t-imply-that-there-are-other.patch"

From 9c9c01e5dcdf6ecf6c1546a545a7cc12d4591366 Mon Sep 17 00:00:00 2001
From: David Cantrell <david@cantrell.org.uk>
Date: Thu, 11 Jul 2019 12:04:40 +0100
Subject: [PATCH 2/3] minor clarification, don't imply that there are other
 undocumented env vars in play

---
 dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm b/dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm
index 6d0fdb7abf..f94e97099e 100644
--- a/dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm
+++ b/dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm
@@ -203,7 +203,7 @@ C<I18N::LangTags::implicate_supers(...)>, like so:
 
 =head1 ENVIRONMENT
 
-This module looks for several environment variables, including
+This module looks at several environment variables:
 REQUEST_METHOD, HTTP_ACCEPT_LANGUAGE,
 LANGUAGE, LC_ALL, LC_MESSAGES, and LANG.
 
-- 
2.22.0


--OgqxwSJOaUobr8KG
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="0003-bump-version.patch"

From 085b64071234803c55c20ed64f80c85a7308c24f Mon Sep 17 00:00:00 2001
From: David Cantrell <david@cantrell.org.uk>
Date: Thu, 11 Jul 2019 12:35:58 +0100
Subject: [PATCH 3/3] bump version

---
 dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm b/dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm
index f94e97099e..d7a0d46b83 100644
--- a/dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm
+++ b/dist/I18N-LangTags/lib/I18N/LangTags/Detect.pm
@@ -11,7 +11,7 @@ our ( $MATCH_SUPERS, $USING_LANGUAGE_TAGS,
 BEGIN { unless(defined &DEBUG) { *DEBUG = sub () {0} } }
  # define the constant 'DEBUG' at compile-time
 
-our $VERSION = "1.07";
+our $VERSION = "1.08";
 our @ISA = ();
 use I18N::LangTags qw(alternate_language_tags locale2language_tag);
 
-- 
2.22.0


--OgqxwSJOaUobr8KG--
0
david
7/11/2019 12:30:19 PM
perl.perl5.porters 47791 articles. 1 followers. Follow

0 Replies
28 Views

Similar Articles

[PageSpeed] 29

Reply: