MasonX-Resolver-Polyglot
view release on metacpan or search on metacpan
lib/MasonX/Resolver/Polyglot.pm view on Meta::CPAN
sub get_info{
my ($self, $path, $comp_root_key, $comp_root_path) = @_;
# Is this already stored somewhere I can grab it?
# I suspect this is wasteful.
my $r = Apache->request;
$DEBUG && $r->log_error(qq(URI:) . $r->uri . qq(, path: $path));
$DEBUG && $r->log_error(qq(Header says: ), $r->header_in('Accept-Language'));
# Get a ranked list of language prefs based on the Accept-Language and URI
# everything in get_langs will need an $r
$self->{r} = $r;
my @langs = @{$self->get_langs(\$path)};
$DEBUG && $r->log_error("Languages Accepted: ", join(",", @langs));
delete $self->{r};
# If we have a default language set, then "" gets spliced in
# immediately after that language in the pref list.
if($self->{default_lang}){
( run in 0.999 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )