Net::Pavatar - Pavatar client
Version 1.01
use Net::Pavatar; my ($hash, $file_type) = Net::Pavatar->fetch( 'http://someblog.com/', { size => [32, 48] } ); if ($file_type) { open FILE, ">avatar.$file_type"; print FILE $hash->{'48'}; close FILE; }
Fetches a pavatar image from a given URL and gives it to you in the sizes you specify. Uses LWPx::ParanoidAgent to protect your servers from attacks.
This module fully conforms to Pavatar spec 0.3.0 (http://pavatar.com/spec/pavatar-0.3.0), which is the latest one on Apr 25th, 2007.
Returns a hashref and a string, as a 2-list. The hash contains the image sizes as keys, and the image data for each size as values. The string contains the image type and can either be 'jpeg', 'png' or 'gif'. If a pavatar does not exist, or is not valid for any reason, returns null.
The \%opts hashref is optional, and accepts the following keys:
size : the sizes that you want the pavatar image returned in - defaults to 80
size
timeout : the total time that UserAgent is allowed to retrieve each page or image - defaults to 15
timeout
e.g. Net::Pavatar->fetch( $url, { size => [32, 48], timeout => 25 } )
Net::Pavatar->fetch( $url, { size => [32, 48], timeout => 25 } )
Alexander Karelas, <karjala at karjala.org>
<karjala at karjala.org>
Please report any bugs or feature requests to bug-net-pavatar at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Pavatar. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-net-pavatar at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Net::Pavatar
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Net-Pavatar
CPAN Ratings
http://cpanratings.perl.org/d/Net-Pavatar
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-Pavatar
Search CPAN
http://search.cpan.org/dist/Net-Pavatar
Module's RSS feed
http://myperl.eu/permodule/Net-Pavatar
Copyright 2007 Alexander Karelas, 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 Net::Pavatar, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Pavatar
CPAN shell
perl -MCPAN -e shell install Net::Pavatar
For more information on module installation, please visit the detailed CPAN module installation guide.