WURFL and Perl
Posted: Fri Oct 19, 2012 4:23 pm
Hello, is there a standard WURFL API for Perl?
thanks
thanks
Code: Select all
use Net::WURFL::ScientiaMobile;
# Create the client
my $scientiamobile = Net::WURFL::ScientiaMobile->new(
api_key => 'xxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
);
get '/' => sub {
# Detect your device
$scientiamobile->detectDevice(request->env);
# Use the capabilities
if ($scientiamobile->getDeviceCapability('ux_full_desktop')) {
return "This is a desktop web browser";
} else {
return "This is a mobile device";
}
};