Why not adopt me?
NAME
WWW::Pastebin::Many::Retrieve - retrieve pastes from many different pastebin sites
SYNOPSIS
use strict;
use warnings;
use WWW::Pastebin::Many::Retrieve;
my $paster = WWW::Pastebin::Many::Retrieve->new;
my @pastes = qw(
http://pastebin.ca/963177
http://pastebin.com/d2fbd2737
http://www.nomorepasting.com/getpaste.php?pasteid=10124
http://pastie.caboo.se/172741
http://phpfi.com/302683
http://rafb.net/p/XU5KMo65.html
http://paste.ubuntu-nl.org/61578/
);
for ( @pastes ) {
print "Processing paste $_\n";
$paster->retrieve( $_ )
or warn $paster->error
and next;
print "Content on $_ is:\n$paster\n";
}
DESCRIPTION
The module provides interface to retrieve pastes from several pastebins (see "SUPPORTED PASTEBINS" section) using a single method by giving it URI to the paste.
CONSTRUCTOR
new
my $paster = WWW::Pastebin::Many::Retrieve->new;
my $paster = WWW::Pastebin::Many::Retrieve->new( timeout => 20 );
Constructs and returns a new WWW::Pastebin::Many::Retrieve object. Takes one argument which is optional:
timeout
my $paster = WWW::Pastebin::Many::Retrieve->new( timeout => 20 );
Optional. Specifies the timeout in seconds this will be passed into constructors for all the pastebin retrieving modules used under the hood. See "SUPPORTED PASTEBINS" section below. Defaults to: whatever the default is for particular pastebin retrieving module; usually it is 30
seconds.
METHODS
retrieve
my $response = $paster->retrieve('http://uri_to_some_paste/')
or die $paster->error;
Instructs the object to retrieve certain paste. Takes one mandatory argument which must be the URI pointing to the paste on one of the supported pastebin sites (see "SUPPORTED PASTEBINS" section). The return value on success will be what the return from retrieve()
method of a particular pastebin retrieving module would return; this is differs enough to be useless thus use the content()
method (see below) to obtain the content of the paste. On failure returns either undef
or an empty list and the reason for failure will be available via error()
method.
error
my $response = $paster->retrieve('http://uri_to_some_paste/')
or die $paster->error;
Takes no arguments, returns a human parsable message explaining why the call to retrieve()
method failed.
response
my $last_response = $paster->response;
Must be called after a successful call to retrieve()
. Takes no arguments, returns the exact same thing last call to retrieve()
returned.
content
my $paste_content = $paster->content;
print "Paste content is: $paster\n";
Must be called after a successful call to retrieve()
. Takes no arguments, returns the content of the paste you retrived. This method is also overloaded as q|""|
thus you can simply interpolate your object in a string to obtain the content of the paste.
SUPPORTED PASTEBINS
Note: this module no longer supports http://paste.css-standards.org/ pastebin as the site no longer exists.
Currently the module is able to retrieve pastes from the following pastebins:
http://pastebin.ca/963177
Handled by WWW::Pastebin::PastebinCa::Retrieve
http://pastebin.com/d2fbd2737
Handled by WWW::Pastebin::PastebinCom::Retrieve
http://www.nomorepasting.com/getpaste.php?pasteid=10124
Handled by WWW::Pastebin::NoMorePastingCom::Retrieve
http://pastie.caboo.se/172741
Handled by WWW::Pastebin::PastieCabooSe::Retrieve
http://phpfi.com/302683
Handled by WWW::Pastebin::PhpfiCom::Retrieve
http://rafb.net/p/XU5KMo65.html
Handled by WWW::Pastebin::RafbNet::Retrieve
http://paste.ubuntu-nl.org/61578/
Handled by WWW::Pastebin::UbuntuNlOrg::Retrieve
AUTHOR
Zoffix Znet, <zoffix at cpan.org>
(http://zoffix.com, http://haslayout.net)
BUGS
Please report any bugs or feature requests to bug-www-pastebin-many-retrieve at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Pastebin-Many-Retrieve. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc WWW::Pastebin::Many::Retrieve
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-Pastebin-Many-Retrieve
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
COPYRIGHT & LICENSE
Copyright 2008 Zoffix Znet, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.