John Siracusa schreef:Okay, here's a simple implementation of a memoized DateTime::Locale::load().
A solution that is more or less equivalent, is to change the DefaultLocale routine. [...] Probably this changes the behaviour if the default locale is aliased. But IMHO, that's probably for the better.
Yeah, that was my concern: add_aliases() and friends in DateTime::Locale would have to reach back into DateTime and blank the cached locale, which seemed evil to me. But I was just thinking of preserving the existing behavior. If this is not a constraint, then I'm all for the alternative you suggested.
-John
