WWW::Instapaper::Client - An implementation of the Instapaper client API (see


        require WWW::Instapaper::Client;
        my $paper = WWW::Instapaper::Client->new(
                username        => '', # E-mail OR username
                password        => 'SooperSekrit',
        my $result = $paper->add(
                url   => 'http://some.domain/path/to/page.html',
                title => "Page Title",  # optional, will try to get automatically if not given
                selection => 'Some text on the page', #optional
        if (defined $result) {
                print "URL added: ", $result->[0], "\n";  #
                print "Title: ", $result->[1], "\n";      # Title of page added
        else {
                # Must be an error
                warn "Was error: " . $paper->error . "\n";


This module is an implementation of the Instapaper API.

        my $paper = WWW::Instapaper::Client->new( %parameters );

Returns a new instance of this class, configured with the appropriate parameters. Dies if invalid parameters are provided.

Possible parameters are:


The user agent ("browser") the server will see. Defaults to WWW-Instapaper-Client/$VERSION.


The Instapaper username. Often, but not always, an e-mail address. Defaults to $ENV{instapaper_user}


The password for the user's Instapaper account. The user may not have a password, in which case, any value works. Defaults to $ENV{instapaper_pass}


The base URL for the Instapaper API. Defaults to You shouldn't need to change this unless you're connecting to a non-Instapaper service that uses the same API.

http_proxy, http_proxyuser, http_proxypass

The path to an HTTPS-capable proxy, and the username and password as appropriate. The standard HTTP_PROXY set of environment variables will work here; these are widely documented. You only need to specify these if you have a proxy AND you don't have the environment variables set.

        my $result = $paper->add(
                url       =>  '',  # required
                title     =>  'Page title',           # optional
                selection =>  'Text from page',       # optional
        if (defined $result) {
                print "URL added: ", $result->[0], "\n";  #
                print "Title: ", $result->[1], "\n";      # Title of page added
        else {
                # Must be an error
                warn "Was error: " . $paper->error . "\n";

Adds the specified page URL to Instapaper. If a title is not provided, Instapaper will attempt to acquire the title by retrieving the page; that is, we set auto-title = 1 for the Instapaper API when a title is not provided.

You may optionally provide text that represents a selection from the page.

If successful, add will return an ARRAYref containing the Instapaper "go" URL, and the page title as recorded by Instapaper.

If an error is encountered, add returns undefined and the error message is available in $paper-error()>.

        $paper->authenticate or warn "Could not authenticate: ".$paper->error."\n";

Authenticates the user to Instapaper. This is useful to check that the credentials are valid before e.g. storing them for later use.

If successful, authenticate will return a true value.

If an error is encountered, authenticate returns undefined and the error message is available in $paper-error()>.


Release 0.9_001

Fixed dependency bug in Build.PL - forgot that Class::Base was required.


Darren Meyer - DPMEYER on PAUSE


(c) 2010 Darren Meyer (DPMEYER on PAUSE), and available under the same terms as Perl itself.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 227:

'=item' outside of any '=over'

Around line 231:

You forgot a '=back' before '=head1'