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 (ads.gr mobile ads) Mobile::Ads::Adultmoda Mobile::Ads::Buzzcity Mobile::Ads::Decktrade Mobile::Ads::GetMobile Mobile::Ads::MoJiva Mobile::Ads::ZastAdz
Mobile::Ads
Mobile::Ads::AdMob_v1
Mobile::Ads::AdMob_v2
Mobile::Ads::Admoda
Mobile::Ads::AdSense
Mobile::Ads::Adsgr
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 (?)
=> 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 => 'http://ad.serving.site/ad.php', method => 'GET', params => { 'some' => 'params' 'can' => 'go here' } });
will result in ``http://ad.serving.site/ad.php?some=params&can=go%20here'' 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.
0.0.1 Initial Release 0.0.2 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 Mail::Sender.pm Version : 0.8.00 which is available on CPAN.
Thanos Chatziathanassiou <tchatzi@arx.net> http://www.arx.net
Copyright (c) 2008 arx.net - 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.
To install Mobile::Ads, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mobile::Ads
CPAN shell
perl -MCPAN -e shell install Mobile::Ads
For more information on module installation, please visit the detailed CPAN module installation guide.