WWW::Hashbang::Pastebin::Client - a client library for WWW::Hashbang::Pastebin websites
version 0.003
use WWW::Hashbang::Pastebin::Client; my $client = WWW::Hashbang::Pastebin::Client->new(url => 'http://p.hashbang.ca'); # retrieve paste content by paste ID print $client->get('b'), "\n"; # create a paste from a string my $pasted_string_url = $client->paste(paste => rand()); # create a paste from a file my $pasted_file_url = $client->paste(file => '/var/log/syslog'); print "$pasted_string_url\n$pasted_file_url\n";
WWW::Hashbang::Pastebin::Client is, as you might expect, a client library for interfacing with WWW::Hashbang::Pastebin websites. It also ships with an example command-line client p.
Creates a new client object. You must provide the URL of the WWW::Hashbang::Pastebin site you want to talk to:
my $client = WWW::Hashbang::Pastebin::Client->new(url => 'http://p.hashbang.ca');
Create a new paste on the specified website. Specify either file to read in the named file, or paste to provide the text directly:
file
paste
# create a paste from a string my $pasted_string_url = $client->paste(paste => rand()); # create a paste from a file my $pasted_file_url = $client->paste(file => '/var/log/syslog'); print "$pasted_string_url\n$pasted_file_url\n";
This is a synonym for "paste".
Get paste content from the pastebin. Pass just the ID of the paste:
# retrieve paste content by paste ID print $client->get('b'), "\n";
This is a synonym for "get"
The project homepage is http://metacpan.org/release/WWW-Hashbang-Pastebin-Client/.
The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit http://www.perl.com/CPAN/ to find a CPAN site near you, or see https://metacpan.org/module/WWW::Hashbang::Pastebin::Client/.
The development version is on github at http://github.com/doherty/WWW-Hashbang-Pastebin-Client and may be cloned from git://github.com/doherty/WWW-Hashbang-Pastebin-Client.git
You can make new bug reports, and view existing ones, through the web interface at https://github.com/doherty/WWW-Hashbang-Pastebin-Client/issues.
Mike Doherty <doherty@cpan.org>
This software is copyright (c) 2012 by Mike Doherty.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install WWW::Hashbang::Pastebin::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Hashbang::Pastebin::Client
CPAN shell
perl -MCPAN -e shell install WWW::Hashbang::Pastebin::Client
For more information on module installation, please visit the detailed CPAN module installation guide.