Skip Menu |

This queue is for tickets about the Locale-Codes CPAN distribution.

Report information
The Basics
Id: 69100
Status: resolved
Priority: 0/
Queue: Locale-Codes

People
Owner: Nobody in particular
Requestors: GUIDO [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 3.16
Fixed in: (no value)



Locale-Codes is full of "return undef". One example is all_country_names which returns (undef) instead of () when called with an invalid codeset. If I see it correctly you can safely do s/return undef/return/g on all sources without breaking anything.
Most of the "return undef" lines are intentional. That was the API in the 2.xx days and I am maintaining (as close to) exact backward compatibility as possible since it is distributed as part of the core perl modules. However, you are correct about the all_XXX_codes and all_XXX_names functions, and I've corrected them. It will be in 3.17 which will be released in the next couple of days.