Apache::Language 0.14 review

Download
by rbytes.net on

Apache::Language is a Perl transparent language support for Apache modules and mod_perl scripts. SYNOPSIS In YourModule.pm:

License: Perl Artistic License
File size: 15K
Developer: Philippe M. Chiasson
0 stars award from rbytes.net

Apache::Language is a Perl transparent language support for Apache modules and mod_perl scripts.

SYNOPSIS

In YourModule.pm:

sub handler {
my $r = shift;
use Apache::Language;
my $lang = Apache::Language->new($extra_args);
#$lang is now a hash ref that will automacigally pick the right language

print $lang->{'Error01'} if exists $lang->{'Error01'};

foreach ( keys %$lang ){
print "$_ is " . $lang->{$_};
}

[...]
}

The goal of this module is to provide a simple way for mod_perl module writers to include support for multiple language requests.

This is version 0.03, and it's a complete rewrite from the ground-up of the previous release. It's still backward-compatible with the other releases, but now it's much more advanced.

An Apache::Language object acts like a language-aware hash. It stores key/language/values triplets. Using the Accept-Language: field sent by the web-client, it can pick the best fit language for that specific client. It's usage is transparent and should prove to be quite convenient (and hopefully, efficient).

The method used to store/fetch information is now completely modular and will allow easy creation of new storage methods thru a simple API (see the API section).

Requirements:
Perl

Apache::Language 0.14 search tags