View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Zoffix Znet > WWW-Pastebin-Many-Retrieve-0.002 > WWW::Pastebin::Many::Retrieve



Annotate this POD


Open  1
View/Report Bugs
Module Version: 0.002   Source  


WWW::Pastebin::Many::Retrieve - retrieve pastes from many different pastebin sites


    use strict;
    use warnings;

    use WWW::Pastebin::Many::Retrieve;

    my $paster = WWW::Pastebin::Many::Retrieve->new;

    my @pastes = qw(

    for ( @pastes ) {
        print "Processing paste $_\n";

        $paster->retrieve( $_ )
            or warn $paster->error
            and next;

        print "Content on $_ is:\n$paster\n";


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.



    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:


    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.



    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.


    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.


    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.


    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.


Note: this module no longer supports pastebin as the site no longer exists.

Currently the module is able to retrieve pastes from the following pastebins:

Handled by WWW::Pastebin::PastebinCa::Retrieve

Handled by WWW::Pastebin::PastebinCom::Retrieve

Handled by WWW::Pastebin::NoMorePastingCom::Retrieve

Handled by WWW::Pastebin::PastieCabooSe::Retrieve

Handled by WWW::Pastebin::PhpfiCom::Retrieve

Handled by WWW::Pastebin::RafbNet::Retrieve

Handled by WWW::Pastebin::UbuntuNlOrg::Retrieve


Zoffix Znet, <zoffix at> (,


Please report any bugs or feature requests to bug-www-pastebin-many-retrieve at, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


You can find documentation for this module with the perldoc command.

    perldoc WWW::Pastebin::Many::Retrieve

You can also look for information at:


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.

syntax highlighting: