Mobile::Wurfl

Description

Mobile::Wurfl is a Perl module interface to WURFL (the Wireless Universal Resource File. SYNOPSIS my $wurfl = Mobile::Wurfl->new( wurfl_home => "/path/to/wurfl/home", db_descriptor => "DBI:mysql:database=wurfl:host=localhost", db_username => wurfl, db_password => wurfl, wurfl_url => q{http://wurfl.sourceforge.net/wurfl.xml} ); my $dbh = DBI->connect( $db_descriptor, $db_username, $db_password ); my $wurfl = Mobile::Wurfl->new( dbh => $dbh ); my $desc = $wurfl->get( db_descriptor ); $wurfl->set( wurfl_home => "/another/path" ); $wurfl->create_tables( $sql ); $wurfl->update(); $wurfl->get_wurfl(); $wurfl->rebuild_tables(); my @devices = $wurfl->devices(); for my $device ( @devices ) { print "$device->{user_agent} : $device->{id}n"; } my @groups = $wurfl->groups(); my @capabilities = $wurfl->capabilities(); for my $group ( @groups ) { @capabilities = $wurfl->capabilities( $group ); } my $ua = $wurfl->canonical_ua( "SonyEricssonK750i/R1J Browser/SEMC-Browser/4.2 Profile/MIDP-2.0 Configuration/CLDC-1.1" ); my $deviceid = $wurfl->deviceid( $ua ); my $wml_1_3 = $wurfl->lookup( $ua, "wml_1_3" ); print "$wml_1_3->{name} = $wml_1_3->{value} : in $wml_1_3->{group}n"; my $fell_back_to = wml_1_3->{deviceid}; my $width = $wurfl->lookup_value( $ua, "max_image_height", no_fall_back => 1 ); $wurfl->cleanup(); Mobile::Wurfl is a perl module that provides an interface to mobile device information represented in wurfl (http://wurfl.sourceforge.net/). The Mobile::Wurfl module works by saving this device information in a database (preferably mysql). It offers an interface to create the relevant database tables from a SQL file containing "CREATE TABLE" statements (a sample is provided with the distribution). It also provides a method for updating the data in the database from the wurfl.xml file hosted at http://www.nusho.it/wurfl/dl.php?t=d&f=wurfl.xml. It provides methods to query the database for lists of capabilities, and groups of capabilities. It also provides a method for generating a "canonical" user agent string (see "canonical_ua"). Finally, it provides a method for looking up values for particular capability / user agent combinations. By default, this makes use of the hierarchical "fallback" structure of wurfl to lookup capabilities fallback devices if these capabilities are not defined for the requested device..

Wireless Universal Resource File - Mobilewurfl - Perl Module - Capabilities - Db - Ua - Interface - Wml - Libraries - Programming

Published By:Ave Wrigley

License Type:Freeware

Date Added:22 October, 2010

Version:1.06

Price:Free

Downloads:67

Size:102.4 KB

Platform: Linux

What people say
- required fields
     
Related Downloads

Data::Encrypted is a Perl module to transparently store encrypted data via RSA. SYNOPSIS # functional interface: use Data::Encrypted file => "./.

DateAug 12, 2010

AuthorAaron J Mackey

Size7.2 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

XML::Generator::vCard is a Perl module that can generate SAX2 events for vCard 3.

DateOct 4, 2010

AuthorAaron Straup Cope

Size7.2 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

WWW::Webrobot::pod::Testplan is a Perl module that helps you on how to write a test plan for webrobot. A test plan is a list of elements. An element itself may be a request, a (sub) test plan, an include or a cookie control command.

DateAug 25, 2010

AuthorABAS Software AG

Size98.3 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

Test::Stochastic is a Perl module to check probabilities of randomized methods. SYNOPSIS use Test::Stochastic qw(stochastic_ok); stochastic_ok sub { ...random sub...}, {a => 0.4, b => 0.6}; stochastic_ok {a => 0.4, b => 0.

DateAug 26, 2010

AuthorAbhijit Mahabal

Size4.1 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

Games::SGF::Tournament is a Perl module for tournament statistics generator.

DateOct 6, 2010

AuthorAl Nikolov

Size12.3 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming