Apache2-WurflPremium
view release on metacpan or search on metacpan
lib/Apache2/WurflPremium.pm view on Meta::CPAN
package Apache2::WurflPremium;
use strict;
use warnings;
use Data::Dumper;
use Apache2::Const;
use Apache2::RequestRec;
use APR::Table;
use Apache2::Module ();
use Apache2::ServerUtil;
use Net::WURFL::ScientiaMobile;
use Net::WURFL::ScientiaMobile::Cache::Cache;
use Cache::File;
# ABSTRACT: A module that the Wurfl Perl client to retrieve capabilities data from the Wurfl server
=pod
=head1 NAME
Apache2::WurflPremium -A module that the Wurfl Perl client to retrieve capabilities data from the Wurfl server
=head1 DESCRIPTION
-A module that the Wurfl Perl client to retrieve capabilities data from the Wurfl server
=head1 METHODS
=cut
use 5.010;
use strict;
use warnings;
our $VERSION = '0.01';
=pod
=head2 handler
The handler retrieves the user_agens and the api key.
It then checks the cache for existing data
If none is there is retrieves data from the Wurfl server
and sets the environment accordingly.
=cut
sub get_config {
Apache2::Module::get_config('Apache2::Wurfl::Parameters', @_);
}
sub handler {
my $r = shift;
#get user agent
my $headers_in = $r->headers_in;
my $user_agent = $headers_in->get('User-Agent');
#get api key
my $s = $r->server;
( run in 0.604 second using v1.01-cache-2.11-cpan-6aa56a78535 )