1Locale::Codes::Changes(U3s)er Contributed Perl DocumentatLioocnale::Codes::Changes(3)
2
3
4
6 Locale::Codes::Changes - details changes to Locale::Codes
7
9 This describes the changes made to modules in the Locale-Codes
10 distribution. Major changes are marked with asterisks (*). For the
11 most part, all modules have remained backward compatible at every
12 release, but occasionally a change is made which is backward
13 incompatible. These are marked with an exclamation mark (!).
14
15 As of 3.00, the codes are autogenerated from the standards. With each
16 release, codes will be re-generated and tested to see if any code
17 changed. Any time there are any changes to the codes, it will be
18 flagged below with a change: NEW CODE(s).
19
20 I intend to check for new codes four times a year (March, June,
21 September, December). I will also try to respond to requests for a
22 release due to changes made to the standards, so if a code changes that
23 you use, feel free to contact me. Based on my available time and the
24 time until the next release is scheduled, I will try to do a release
25 any time the standards change.
26
30 NEW CODE(s)
31 Converted tests to use Test::Inter
32 Now uses the same module to do tests as all my other modules.
33
35 NEW CODE(s)
36
38 NEW CODE(s)
39 Removed travis file from the tarball
40 The tarball had a .travis.yml file in it that wasn't in the
41 MANIFEST file. Since the MANIFEST file is automatically generated
42 by the perl mkmanifest tool, since it didn't see the .travis.yml
43 file, I have excluded it from the tarball. Reported by Mohammad S
44 Anwar on GitHub (#10)
45
47 NEW CODE(s)
48 (*) Locale-Codes removed from core
49 Locale-Codes will no longer be distributed in new versions of perl.
50
51 Documentation fix
52 Fixed an incorrect link reported by Mohammad S Anwar on GitHub (#9)
53
55 NEW CODE(s)
56
58 NEW CODE(s)
59
61 NEW CODE(s)
62 (*) Deprecated in core
63 Because correct usage of any of the Locale::Codes modules requires
64 that they be kept up-to-date, I have long felt that it should not
65 be distributed as a core module. After discussion on the
66 perl5-porters list, it is agreed, and the deprecation process has
67 been started. Starting with perl 5.28.0, Locale-Codes will be
68 flagged as deprecated, and it will be removed in version 5.30.0 .
69
70 Thanks to p5p-porters (especially Dagfinn Ilmari Mannsaker) for
71 discussion and guidance.
72
73 Changes from a github pull request applied
74 A couple minor changes (updated .travis.yml to include newest
75 versions of perl; and a couple changes to pod_coverage.t) reported
76 by lancew on GitHub.
77
78 Got rid of Build.PL
79 Simplified things by only supporting one of Makefile.PL/Build.PL
80 (and the latter has been removed from perl core some time ago). RT
81 123572
82
83 Fixed INSTALLDIRS
84 The behavior of installing core modules changed in 5.12 a bit, and
85 Makefile.PL now reflects that. RT 123571
86
88 NEW CODE(s)
89
91 NEW CODE(s)
92 Fixed the default error condition in legacy modules.
93 With the addition of the OO module, better error handling was added
94 (and it was on by default). The non-OO (legacy) modules did not
95 report errors, so code that uses them, would now behave differently
96 if invalid data were passed in.
97
98 I have turned off error handling by default in the legacy modules.
99 The show_errors method was added to each of the non-OO modules to
100 report errors if desired.
101
102 Reported by dmaestro on GitHub.
103
105 NEW CODE(s)
106
108 NEW CODE(s)
109 Tests no longer require (.) in INC
110 As of perl 5.25.11, (.) is being removed from INC. I had to adjust
111 the tests accordingly.
112
114 NEW CODE(s)
115 (*) Rewrote as OO module
116 The core module (Locale::Codes) is now an OO module that can be
117 used directly. All of the other modules (Locale::Codes::TYPE) are
118 still the older functional interfaces and remain unchanged.
119
120 Added some constants
121 Historically, the constant names used to identify the codesets have
122 been named inconsistently. The original constants for codesets
123 are:
124
125 Type Constants
126
127 country LOCALE_CODE_*
128 currency LOCALE_CURR_*
129 language LOCALE_LANG_*
130
131 script LOCALE_SCRIPT_*
132 langfam LOCALE_LANGFAM_*
133 langvar LOCALE_LANGVAR_*
134 langext LOCALE_LANGEXT_*
135
136 For consistencies sake, I have added some new codes (which are
137 otherwise identical to the irregularly named codes):
138
139 country LOCALE_COUNTRY_*
140 currency LOCALE_CURRENCY_*
141 language LOCALE_LANGUAGE_*
142
143 Going forward, all constants will include the full name of the code
144 type.
145
146 Non-OO modules are now generated
147 All non-OO modules are now automatically generated. This will make
148 it easier to keep them 100% consistent as well as making it easier
149 to add new types of code sets.
150
151 All of the documentation for them is also generated except for the
152 description of the code sets. That has been moved into the
153 Locale::Codes::Types document.
154
155 Fixed a bug where constants were not exported
156 Some of the constants for some of the newer code sets were not
157 exported properly. This was fixed when I started generating the
158 non-OO modules, but was reported (after I had already fixed it in
159 development) as RT 119741 .
160
162 Added Czech republic aliases back in
163 Common Czech republic aliases disappeared from the standards, so I
164 added them back in. Rob Emery
165
167 NEW CODE(s)
168 Jiri Bohac noted that they were needed so this was release a couple
169 weeks earlier than planned.
170
172 NEW CODE(s)
173
175 Added UN codes back in
176 The UN codes have been added back in as their own list of codes.
177 Jarkko Hietaniemi
178
179 Added GENC codes
180 The GENC codes have been added. These are the new US Government
181 codes that replace the FIPS-10 codes. They are based on, but not
182 identical to the ISO 3166 codes.
183
185 NEW CODE(s)
186 Tests reworked
187 Improved test suite (and made some changes to Codes.pm) based on
188 Devel::Cover. Test suite now has 100% coverage.
189
191 NEW CODE(s)
192
194 NEW CODE(s)
195 (!) Removed alias_code function
196 The alias_code function was preserved for backward compatibility,
197 but has been deprecated since 3.20. It has been removed.
198
200 NEW CODE(s)
201 Documentation improvements
202 Many changes to the formatting in the documentation to improve it.
203 Suggested by Pete Houston.
204
206 NEW CODE(s)
207
209 NEW CODE(s)
210 Filled out LOCALE_LANG_TERM codeset
211 The terminologic language codes only included codes from languages
212 where the ISO specified both a bibliographic code and a
213 terminologic code. If both are not specified, the better solution
214 was to use the code for both code sets. Prompted by a suggestion
215 by Jarkko Hietaniemi.
216
217 Moved repository to GitHub
218 Suggested by Gabor Szabo.
219
221 NEW CODE(s)
222
224 NEW CODE(s)
225 Bug fixes
226 Fixed a bug in the scripts used to extract data from spreadsheets
227 that prevented the SHP currency code from being found. RT 94229
228
230 NEW CODE(s)
231 alias_code remove date set
232 The alias_code function exists for backward compatibility. It has
233 been deprecated since version 3.20 when it was replaced by
234 rename_country_code. The alias_code function will be removed in
235 the December 2014 release.
236
237 Bug fixes
238 Fixed a problem that was preventing rename_* functions to not work.
239 RT 92680.
240
242 NEW CODE(s)
243 ISO 3166 country codes improved
244 ISO 3166 is now browsable online (previously, only the alpha-2
245 codes were) and it contains more accurate information than the
246 previous sources, so I've switched to using the full standard. In
247 response to RT 92303 which reported some codes being 'retired' that
248 should not have been.
249
250 Bug fixes
251 Fixed the pod test files so that pod tests won't get run at install
252 time. In response to RT 91167.
253
255 NEW CODE(s)
256
258 NEW CODE(s)
259 * FIPS-10 country codes removed
260 As of June, the FIPS codes are not being published in their
261 entirety. Only changes to the codes are published. This adds a
262 huge layer of complexity to maintaining the set, which is not worth
263 doing considering that the set is deprecated. As such, the code
264 set is no longer supported.
265
267 Documentation fixes
268 Some of the examples were not correct. RT 84589
269
270 Some typos corrected. RT 85692
271
273 NEW CODE(s)
274
276 NEW CODE(s)
277 Syria alias
278 Syria added as an alias. RT 82747
279
280 FIPS-10 country codes deprecated
281 The FIPS-10 document is being withdrawn. It was deprecated in
282 2008, and is being updated now only until all the agencies that use
283 it have switched to something else. The current version no longer
284 lists the long names for countries. These long names (such as
285 'Republic of Albania' for Albania) only appeared in the old FIPS-10
286 document which is no longer available, so they are no longer
287 available in this module.
288
289 I will continue to support the FIPS-10 codeset as long as it is
290 available, but at that point, it will be withdrawn immediately. If
291 an official end-of-life date is announced, I will include a notice
292 here. Otherwise, support for the codeset will be discontinued when
293 the document is withdrawn.
294
295 You are encouraged to no longer use the FIPS-10 codeset.
296
297 Domain country codes now come from ISO 3166
298 The IANA domain codes have changed slightly. The IANA no longer
299 publishes a list of countries associated with their codes.
300 Instead, they use the ISO 3166 codes and country names. However,
301 they support a few non-standard codes, so I will continue to
302 maintain this codeset. The domain codes are now lowercase to
303 correspond to the ISO 3166 codes.
304
306 NEW CODE(s)
307
309 NEW CODE(s)
310 Updated perl version required
311 Changed 'require 5.002' (which dated back to the version 2.xx
312 Locale-Codes) to 'require 5.006'. Some features used in Locale-
313 Codes are not supported that far back. Nicholas Clark
314
315 Sorted deprecated codes
316 The codes in the generated deprecated codes modules were not sorted
317 making version diffs bigger than they should be. Nicholas Clark
318
320 NEW CODE(s)
321
323 NEW CODE(s)
324 Added limited support for deprecated codes
325 The code2XXX, XXX2code, all_XXX_codes, and all_XXX_names functions
326 now support retired codes. RT 71124
327
328 Fixed capitalization
329 The 'South Sudan' country was all caps. RT 71024
330
331 Pod tests off by default
332 The pod tests will not run at install time. RT 71122
333
334 Codesets may be specified by name
335 All codesets may be specified by a constant or by their name now.
336 Previously, they were specified only by a constant.
337
338 alias_code deprecated
339 The alias_code function exists for backward compatibility. It has
340 been replaced by rename_country_code . The alias_code function
341 will be removed sometime after September, 2013 .
342
343 Code cleanup
344 All work is now done in the central module (Locale::Codes).
345 Previously, some was still done in the wrapper modules
346 (Locale::Codes::*) but that is gone now.
347
348 Added LangFam module
349 Added Language Family codes (langfam) as defined in ISO 639-5.
350
352 NEW CODE(s)
353 No longer use CIA data
354 The CIA world added non-standard values, so I no longer use it as a
355 source of data. Based on a report by Michiel Beijen.
356
358 NEW CODE(s)
359 Added new types of codes
360 Added Language Extension codes (langext) and Language Variation
361 codes (langvar) as defined in the IANA language registry.
362
363 Added new codeset(s)
364 Added language codes from ISO 639-5
365
366 Added language/script codes from the IANA language subtag registry
367
368 Bug fixes
369 Fixed an uninitialized value warning. RT 67438
370
371 Fixed the return value for the all_XXX_codes and all_XXX_names
372 functions. RT 69100
373
374 Reorganized code
375 Reorganized modules to move Locale::MODULE to Locale::Codes::MODULE
376 to allow for cleaner future additions. The original four modules
377 (Locale::Language, Locale::Currency, Locale::Country,
378 Locale::Script) will continue to work, but all new sets of codes
379 will be added in the Locale::Codes namespace.
380
382 NEW CODE(s)
383
385 NEW CODE(s)
386 Minor fixes
387 Added version number to Makefile.PL/Build.PL requirement for POD
388 testing modules. RT 62247
389
390 Changed 'use vars' to 'our'
391
393 NEW CODE(s)
394 Bug fixes
395 Stripped out some HTML that got included with some codes.
396
398 NEW CODE(s)
399
401 NEW CODE(s)
402 Reorganized code
403 Renamed test.pl to testfunc.pl to avoid causing an error when built
404 as part of perl.
405
407 NEW CODE(s)
408 Added new codeset(s)
409 Added the IANA domain names to Country
410
411 Bug fixes
412 Fixed a problem that produced warnings with perl 5.11.5. Jerry D.
413 Hedden
414
416 NEW CODE(s)
417 Reorganized code
418 Moved support files into the Locale::Codes namespace.
419
420 The work done in each of the Locale::XXX modules was virtually
421 identical to each other. It has all been moved to a central module
422 and the Locale::XXX modules are now just wrappers.
423
424 (!) Changed XXX_code2code behavior slightly
425 In previous versions, passing in the same code set for both code
426 set arguments would automatically return undef. For example:
427
428 country_code2code('bo',LOCALE_CODE_ALPHA_2,LOCALE_CODE_ALPHA_2);
429 => undef
430
431 This doesn't seem like reasonable behavior, so it has been changed
432 to allow the same code set:
433
434 country_code2code('bo',LOCALE_CODE_ALPHA_2,LOCALE_CODE_ALPHA_2);
435 => 'bo'
436
437 Note that if an invalid code is passed in, undef will still be
438 returned:
439
440 country_code2code('bol',LOCALE_CODE_ALPHA_2,LOCALE_CODE_ALPHA_2);
441 => undef
442
443 Added many semi-private routines
444 Previous versions had only two semi-private routines:
445 rename_country and alias_code which had the ability to modify the
446 internal data in a couple of very limited ways. It was requested
447 (in an anonymous posting by someone named Steve and also by Steve
448 Hay) that better support for modifying internal data, so a full set
449 of routines were added.
450
451 The full set of routines includes:
452
453 rename_country
454 rename_language
455 rename_currency
456 rename_script
457
458 add_country
459 add_language
460 add_currency
461 add_script
462
463 delete_country
464 delete_language
465 delete_currency
466 delete_script
467
468 add_country_alias
469 add_language_alias
470 add_currency_alias
471 add_script_alias
472
473 delete_country_alias
474 delete_language_alias
475 delete_currency_alias
476 delete_script_alias
477
478 rename_country_code
479 rename_language_code
480 rename_currency_code
481 rename_script_code
482
483 add_country_code_alias
484 add_language_code_alias
485 add_currency_code_alias
486 add_script_code_alias
487
488 delete_country_code_alias
489 delete_language_code_alias
490 delete_currency_code_alias
491 delete_script_code_alias
492
493 New aliases
494 Added "UK" alias. Steve Hay
495
497 Fixed Makefile.PL and Build.PL
498 They now install as core modules as they are supposed to. Reported
499 in RT 54526
500
502 NEW CODE(s)
503 (*) New maintainer
504 From 1997 to 2004, Locale::Codes was maintained by Neil Bowers.
505 Unfortunately, no updates were made from June 2004 to January 2010.
506 During that time, a number of changes were made to the standards,
507 so the data included was out-of-date.
508
509 I contacted Neil to get his permission to assume maintenance of the
510 module, and he kindly agreed.
511
512 (*) (!) All codes are generated from standards
513 All of the values returned by the various functions are now values
514 directly from the standards. This means that the values returned in
515 the 2.xx series are not necessarily the same as the values returned
516 here.
517
518 As an example, the ISO 3166 standard which lists country codes
519 refers to the country associated with the code "bo" as "Bolivia,
520 Plurinational State of", so that is what is returned. In the 2.xx
521 series, "Bolivia" was returned. Also, the country names vary from
522 one standard to another. So the code "bol" which is maintained by
523 the United Nations returns the name of the country as "Bolivia
524 (Plurinational State of)". Some common aliases have been added, so
525 you can still request a code associated with a county name
526 "Bolivia".
527
528 Since the data comes from the standards, some "incorrect" values
529 are no longer supported. For example, 2.07 treated "Zaire" as an
530 alias for "Congo", but the country changed it's name, and "Zaire"
531 is not in the standard, so it has been dropped in 3.00.
532
533 Added new codeset(s)
534 FIPS 10 country codes (requested in RT 1755)
535
536 Alpha-3 and Term language codes (requested in RT 11730)
537
538 Numeric currency codes (requested in RT 18797)
539
540 (*) (!) Locale::Script changed
541 In 2.xx, Locale::Script assigned scripts to country codes, which is
542 NOT how it is done currently in the standards. It appears that an
543 older version of ISO 15924 did this, but I haven't found an old
544 version to confirm that, and in any case, that is not the case in
545 the current standards.
546
547 As a result, the Locale::Script module is completely incompatible
548 with the 2.xx version with respect to the types of codes it
549 supports. None of the old codes will work.
550
551 Added missing functions
552 I've added in some functions which were "missing" previously (since
553 there was only one set of codes supported, the code2code functions
554 didn't apply):
555
556 language_code2code
557 currency_code2code
558
559 so the interfaces for each type of codes are consistent.
560
561 (!) Dropped support for _alias_code
562 In Locale::Country, _alias_code was an allowed, but deprecated
563 function which was documented to be supported in the 2.xx series.
564 I've removed it.
565
566 (!) All functions return the standard value
567 code2country (and other equivalent functions) now returns the name
568 of the country specified in the standard (if the different
569 standards refer to the country by different variations in the name,
570 the results will differ based on the CODESET)
571
572 (!) rename_country function altered
573 The rename_country function from 2.07 would guess the CODESET
574 (unlike all other functions which used a default of
575 LOCALE_CODE_ALPHA_2). The guess can cause problems since (with the
576 addition of FIPS) codes may appear in different codesets for
577 different countries. The behavior has been changed to be the same
578 as other functions (default to LOCALE_CODE_ALPHA_2).
579
581 Made $_ local in the initialization code for each module change
582 back-propagated from Perl distribution
583
584 Removed two non ISO-8859-1 characters from language names change
585 back-propagated from Perl distribution
586
587 Added the following aliases, with a test case for each
588 - Burma added to Myanmar
589 - French Southern and Antarctic Lands to
590 French Southern Territories patch from TJ Mather
591
592 "Canadian Dollar" was misspelled as "Candian Dollar"
593 - noted by Nick Cabatoff, patch from Michael Hennecke
594
595 Changes to Locale::Country reflecting changes in ISO 3166
596 - added Aland Islands (ax, ala, 248)
597 - YUGOSLAVIA is now SERBIA AND MONTENEGRO
598 YU => CS
599 YUG => SCG
600 891 => 891 (unchanged)
601 (YUGOSLAVIA retained as an alias)
602 - EAST TIMOR changed to TIMOR-LESTE
603 (old name retained as an alias)
604 - three letter code for Romania changed from ROM to ROU
605
606 ZAIRE is now CONGO, THE DEMOCRATIC REPUBLIC OF THE
607 ZR => CD
608 ZAR => COD
609 180 => 180 (unchanged)
610 (ZAIRE retained as alias)
611
613 The four modules which have data after __DATA__ weren't closing the
614 DATA filehandle after reading from it, which they should. Bug and
615 patch from Steve Hay.
616
618 Added three letter codes for the countries that were missing them.
619 Patch from TJ Mather.
620
621 Documentation bug: one of the examples used => where the lvalue was
622 a constant, which isn't allowed, unless you put the () with the
623 constant to force the right interpretation. Pointed out by TJ
624 Mather and MYT.
625
626 Updated the URL for the appendix in the CIA world factbook. Patch
627 from TJ Mather.
628
630 Updated according to changes in ISO 3166-1 described in ISO 3166-1
631 newsletters V-4 and V-5, dated 2002-05-20:
632 - Kazakstan is now "Kazakhstan"
633 - Macau is now "Macao" The old names are retained as aliases.
634
635 The alpha-2 and alpha-3 codes for East Timor have changed:
636 tp -> tl
637 tmp -> tls the numeric code stays 626. If you want to support
638 the old codes, you can use the semi-private function alias_code().
639
641 Fixed a typo in the alias for the Vatican, reported (with patch) by
642 Philip Newton.
643
644 Added "Moldova" as an alias for "Moldova, Republic of"
645
646 Updated Makefile.PL to include AUTHOR and ABSTRACT
647
649 Added semi-private routine rename_country() to Locale::Country,
650 based on a patch from Iain Chalmers.
651
652 Added test rename.t for the above function.
653
654 Renamed _alias_code to be alias_code. Have retained the old name
655 for backwards compatibility. Will remove it when the major version
656 number next changes.
657
659 Split the documentation for all modules into separate pod files.
660
661 Made sure all =over were =over 4; some were other values.
662
663 The code2code() methods had one more shift than was needed.
664
666 Created Locale::Script which provides an interface to the ISO codes
667 for identification of scripts (writing scripts, rather than perl
668 style scripts). The codes are defined by ISO 15924, which is
669 currently in final draft. Thanks to Jarkko for pointing out this
670 new standard. All three code sets are supported, and a test-suite
671 added.
672
673 Added support for country name variants to Locale::Country, so that
674 country2code('USA')
675 country2code('United States')
676 country2code('United States of America') will all return 'us'.
677 This had been in the LIMITATIONS section since the first version.
678 Patch from TJ Mather with additional variants from me. Added test-
679 cases for these.
680
681 Added VERSION to Locale::Constants. Thanks to Jarkko for pointing
682 that it was missing.
683
684 Should really have bumped major version with previous release,
685 since there was a change to the API.
686
688 Added Locale::Constants, which defines three symbols for
689 identifying which codeset is being used:
690
691 LOCALE_CODE_ALPHA_2
692 LOCALE_CODE_ALPHA_3
693 LOCALE_CODE_NUMERIC
694
695 Updated Locale::Country to support all three code sets defined by
696 ISO 3166. This was requested by Keith Wall. I haven't added
697 multiple codeset support to the other modules yet - I'll wait until
698 someone asks for them.
699
701 Added Locale::Currency, contribution from Michael Hennecke.
702
703 Added test suite for it (t/currency.t) and added test cases to
704 t/all.t for the all_* functions.
705
707 Fixed very minor typos from 1.03!
708
710 Updated Locale::Country:
711 - fixed spelling of a few countries
712 - added link to a relevant page from CIA world factbook
713
714 Updated Locale::Language:
715 - fixed typo in the documentation (ISO 939 should be 639)
716
718 Updated Locale::Country and Locale::Language to reflect changes in
719 the relevant ISO standards. These mainly reflect languages which
720 are new to the relevant standard, and changes in the spelling of
721 some country names.
722
723 Added official URLs for the standards to the SEE ALSO sections of
724 the doc for each module.
725
726 Thanks to Jarkko Hietaniemi for pointing me at the pages with
727 latest versions of ISO 3166 and 639.
728
730 Added Locale::Country::_alias_code() so that 'uk' can be added as
731 the code for "United Kingdom", if you want it. This was prompted
732 by Ed Jordan.
733
734 Added a new test suite for handling this case, and extended the
735 existing test-suite to include testing of the case where 'uk'
736 hasn't been defined as a valid code.
737
739 First public release to CPAN
740
742 Locale::Codes
743
745 See Locale::Codes for full author history.
746
747 Currently maintained by Sullivan Beck (sbeck@cpan.org).
748
750 Copyright (c) 2001-2010 Neil Bowers
751 Copyright (c) 2010-2019 Sullivan Beck
752
753 This module is free software; you can redistribute it and/or modify it
754 under the same terms as Perl itself.
755
756
757
758perl v5.28.2 2019-05-28 Locale::Codes::Changes(3)