View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Thanos Chatziathanassiou > Mobile-Ads-0.0.2 > Mobile::Ads



Annotate this POD

View/Report Bugs
Module Version: 0.0.2   Source  


Mobile::Ads - base class for Mobile Ads

Version 0.0.2


 use Mobile::Ads::Admob;


Mobile::Ads provides an object oriented interface to serve advertisements It does nothing by itself and you should probably use one of Mobile::Ads::AdMob_v1 (old AdMob implementation, lacks graphical ads) Mobile::Ads::AdMob_v2 (newer AdMob, support image ads) Mobile::Ads::Admoda Mobile::Ads::AdSense (Google AdSense for Mobile) Mobile::Ads::Adsgr ( mobile ads) Mobile::Ads::Adultmoda Mobile::Ads::Buzzcity Mobile::Ads::Decktrade Mobile::Ads::GetMobile Mobile::Ads::MoJiva Mobile::Ads::ZastAdz

Refer to their man pages for help (?)

new Mobile::Ads ^



=> Does the actual HTTP. url is obviously the ad serving site URL, method is either ``POST'' or anything else (in which case a GET is performed) and params is a hash reference with key/value pairs. The module will take care to URLEncode as neccessary or set Content-length and Content-type if POST. Note that you can either construct a GET URI yourself (taking care of encoding and stuff or pass the arguments in params, but not both).

Example: $response = $ad->get_ad ( { url => '', method => 'GET', params => { 'some' => 'params' 'can' => 'go here' } });

will result in ``'' being actually sent to the server.

Will happily croak() if server is unreachable or not return 200, so eval() as neccessary. Will NOT apply any kind of translation to the returned content. For this, each module should make provisions for itself.


=> Shamelessly plugged from Apache::ASP::Server::URLEncode


=> Just escapes ``&'' where neccessary in its input to make it XML safe. Proably of use to everyone, so put here.

Revision History ^

        Initial Release
        First CPAN released version and the addition of $self->timeout to easily set
        LWP::UserAgent timeout


Thoughtlessly crafted to avoid having the same piece of code in several places. Could use lots of enhancements.


This module borrowed its OO interface from Version : 0.8.00 which is available on CPAN.


Thanos Chatziathanassiou <>


Copyright (c) 2008 - Thanos Chatziathanassiou . All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: