This doesn't appear to me to be a task that should be performed by
Locale::Codes.
Locale::Codes basically stores codes from some standards in a
dictionary, and allows you to look them up. So, if there is a standard
out there that is of general use, I'm interested in adding it. What I'm
NOT interested in doing is adding support for the different ways you
might use that dictionary.
The language-subtag codes (en-CA) are actually a combination of a
language code and a subtag which might be a language subtag, a country
code, or a region tag. In other words, there's no standard out there
that I could see that lists all valid language-subtag values.
NOTE: If I'm incorrect, and someone can point me to such a standard, I
would definitely implement it since this is definitely of general use.
Given my research, I'm probably going to add support for language
subtags (as defined in the IANA registry:
http://www.iana.org/assignments/language-subtag-registry) since that's a
standard I wasn't previously aware of, and might be of use to some people.
At that point, it would make sense to write a second module which used
Locale::Codes to do all the lookups to actually parse the
language-subtag codes. Unfortunately, that isn't a module I'm interested
in writing at this point, so I'm afraid that will fall to someone else.