Lingua-Any-Numbers
view release on metacpan or search on metacpan
lib/Lingua/Any/Numbers.pm view on Meta::CPAN
my $locale = shift;
$lang = _get_lang_from_locale() if $locale || $USE_LOCALE;
$lang = $DEFAULT if ! $lang;
return uc $lang;
}
sub _get_lang_from_locale {
require I18N::LangTags::Detect;
my @user_wants = I18N::LangTags::Detect::detect();
my $lang = $user_wants[0] || return;
($lang,undef) = split m{\-}xms, $lang; # tr-tr
return $lang;
}
sub _is_silent { return defined &SILENT && SILENT() }
sub _dummy_ordinal { return shift }
sub _dummy_string { return shift }
sub _dummy_oo {
my $class = shift;
my $type = shift;
lib/Lingua/Any/Numbers.pm view on Meta::CPAN
sub _probe {
my @compile;
foreach my $module ( _probe_inc() ) {
my $class = $module->[LCLASS];
(my $inc = $class) =~ s{::}{/}xmsg;
$inc .= q{.pm};
if ( ! $INC{ $inc } ) {
my $file = File::Spec->catfile( split m{::}xms, $class ) . '.pm';
eval {
require $file;
$class->import;
1;
} or do {
# some modules need attention
_probe_error($@, $class);
next;
};
$INC{ $inc } = $INC{ $file };
( run in 1.917 second using v1.01-cache-2.11-cpan-71847e10f99 )