Hello, is there a standard WURFL API for Perl?
thanks
WURFL and Perl
-
- Posts: 294
- Joined: Mon Jun 20, 2011 5:04 pm
Re: WURFL and Perl
Hi, we support Perl in our WURFL Cloud solution. You can find examples of usage of the WURFL Perl API here:
http://www.scientiamobile.com/wurflClou ... ngStarted/
Accessing WURFL from Perl is as easy as:
Please let us know if you have more questions
Thank you
http://www.scientiamobile.com/wurflClou ... ngStarted/
Accessing WURFL from Perl is as easy as:
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";
}
};
Thank you
Who is online
Users browsing this forum: No registered users and 1 guest