WWW::Rafb - Perl interface for rafb pasting site ( rafb.net/paste )
# create object with the paste information my $paste = WWW::Rafb->new( 'language' => 'perl', 'nickname' => 'Di42lo', 'description' => 'my first script in perl', 'tabs' => 'No', 'file' => "~/first.pl"); # do the http request ( the paste itself ) $paste->paste(); # print the url print "You can get $paste->{file} at url: $paste->{URL}\n";
"WWW::Rafb" provides object interface for pasting any text file/source file into the the rafb site with the needed information.
This module requires LWP::UserAgent and use URI::Escape.
new( [ARGS] ) Used to set the pasting information about the file and create a new Object of the WWW::Rafb module. Arguments: language - The file type. One of this types: note: you should write the value (in the () ) and not the full name. C89 (c89) C99 (c) C++ (c++) C# (c#) Java (java) Pascal (pascal) Perl (perl) PHP (php) PL/I (pl/i) Python (python) Ruby (ruby) SQL (sql) Visual Basic (vb) Plain Text (plain text) nickname - the nickname of the script/file publisher description' => 'my first script in perl', tabs - values: No/2/4/6/8 file - path of the file we want to upload. NOTES: Returns a blessed object with the information.
paste() Returns the object with the URL of the file in the rafb.net/paste site and the other informations. No Arguments.
http://www.rafb.net/paste
Don't run this script too much times, the site has protection from that. to solve that - sleep(10) between the pastes.
This module was written by Amit Sides <amit.sides@gmail.com>
<amit.sides@gmail.com>
Copyright (c) 2006 Amit Sides. 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 WWW::Rafb, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Rafb
CPAN shell
perl -MCPAN -e shell install WWW::Rafb
For more information on module installation, please visit the detailed CPAN module installation guide.