WWW::Pa...:Create(3)
NAME πΈ
WWW::Pastebin::PastebinCom::Create β paste on www.pastebin.com without API keys. And yes bestie, you're in the right place: this is the manual page for WWW::Pastebin::PastebinCom::Create (3). π
WARNING!!! π¨
IMPORANT. Please read.
You kinda, sorta, maybe shouldn't really use this module. Use WWW::Pastebin::PastebinCom::API instead. Pastebin.com switched to a key-based API (which is what the ::API version implements), and using this, keyless, module lets you paste only 10 pastes per day.
The limit is higher with the WWW::Pastebin::PastebinCom::API module, so check it out.
This module primarily exists for use with App::Nopaste.
SYNOPSIS β¨
use WWW::Pastebin::PastebinCom::Create;
my $bin = WWW::Pastebin::PastebinCom::Create->new;
# all options as defaults
my $paste_uri = $bin->paste( text => 'Some text to paste' )
or die $bin->error;
# all options as custom (module's defaults are shown)
my $paste_uri = $bin->paste(
text => 'Some text to paste',
format => 'none', # no syntax highlights
expiry => 'm', # expire after a month
private => 1, # make the paste unlisted
desc => '', # no "title/name" for the paste
) or die $bin->error;
# object's ->paste_uri() method is overloaded to string interpolation:
print "Your paste uri is $bin\n";
DESCRIPTION π¦
This module provides the means to paste on www.pastebin.com pastebin, without the need for API keys <http://pastebin.com/api>. See the WARNING!!! section above.
METHODS π
new π
my $bin = WWW::Pastebin::PastebinCom::Create->new;
Creates and returns a brand new WWW::Pastebin::PastebinCom::Create object. Does not take any arguments.
paste π
my $paste_uri = $bin->paste( text => 'Some text to paste' )
or die $bin->error;
$bin->paste(
text => 'Some text to paste',
format => 'perl', # perl syntax highlights
expiry => 'asap', # expire in 10 minutes
private => 1, # make the paste unlisted
desc => 'Some title', # "title/name" for the paste
) or die $bin->error;
Pastes to the pastebin. On success returns the link to the newly-created paste (see also the overloaded ->paste_uri method below). On failure returns undef or an empty list, depending on the context, and the human-readable error message will be available via the ->error method. Takes arguments as key/value pairs. Argument text is mandatory, the rest are optional. Possible arguments are as follows:
text π
$bin->paste(
text => 'Some text to paste',
) or die $bin->error;
Mandatory. Takes a string as a value that contains the text to paste.
private π
$bin->paste(
text => 'Some text to paste',
private => 1, # make the paste unlisted
) or die $bin->error;
Optional. This really should be named unlisted, but for compatibility with old code is still named private. Takes a true/false value. If set to a true value, the paste will be "unlisted" (i.e. people will be able to access them if they have a link, but the paste will not be announced on the pastebin.com home page), otherwise the paste will be public and listed on the home page. To make private pastes, you need to be logged in; use WWW::Pastebin::PastebinCom::API if you need that feature. Defaults to: 1 (make pastes unlisted).
desc π·οΈ
$bin->paste(
text => 'Some text to paste',
desc => '', # no "title/name" for the paste
) or die $bin->error;
Optional. Takes a string as a value that specifies the title/name for the paste. If this string is longer than 60 characters, it will be truncated and ... will be appended to the end of it. By default is not specified.
expiry β³
$bin->paste(
text => 'Some text to paste',
expiry => 'm', # expire after a month
) or die $bin->error;
Optional. Takes an expiry code as a value that specifies when the paste should expire. Defaults to: m (expire after a month). Valid expiry codes are as follows (there are multiple possible codes for each duration; they are equivalent):
# Expire after 10 Minutes
10m
m10
asap
# Expire after 1 Hour
h
1h
# Expire after 1 Day
d
1d
soon
# Expire after 1 Week
w
1w
awhile
# Expire after 2 weeks
2w
w2
# Expire after 1 Month
1m
m
m1
eventually
# Never expire
n
never
format π¨
$bin->paste(
text => 'Some text to paste',
format => 'C++ (with QT extensions)',
) or die $bin->error;
Optional. Takes a format code as a value that specifies the paste text format (what syntax highlights to use). Defaults to: none (no syntax highlights). Possible values are as follows; they are case-insensitive:
None
Bash
C
C#
C++
CSS
HTML
HTML 5
Java
JavaScript
Lua
None
Objective C
Perl
PHP
Python
Rails
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
ActionScript
ActionScript 3
Ada
ALGOL 68
Apache Log
AppleScript
APT Sources
ARM
ASM (NASM)
ASP
Asymptote
autoconf
Autohotkey
AutoIt
Avisynth
Awk
BASCOM AVR
Bash
Basic4GL
BibTeX
Blitz Basic
BNF
BOO
BrainFuck
C
C for Macs
C Intermediate Language
C#
C++
C++ (with QT extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
ChaiScript
Clojure
Clone C
Clone C++
CMake
COBOL
CoffeeScript
ColdFusion
CSS
Cuesheet
D
DCL
DCPU-16
DCS
Delphi
Delphi Prism (Oxygene)
Diff
DIV
DOS
DOT
E
ECMAScript
Eiffel
Email
EPC
Erlang
F#
Falcon
FO Language
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
Game Maker
GDB
Genero
Genie
GetText
Go
Groovy
GwBasic
Haskell
Haxe
HicEst
HQ9 Plus
HTML
HTML 5
Icon
IDL
INI file
Inno Script
INTERCAL
IO
J
Java
Java 5
JavaScript
jQuery
error π
$bin->paste( text => 'Some text to paste' )
or die $bin->error;
If an error occurs during pasting, the ->paste method will return an undef or an empty list, depending on the context, and the human-readable error message will be available via the ->error method.
paste_uri π
$bin->paste( text => 'Some text to paste' )
or die $bin->error;
print "Your paste is at " . $bin->paste_uri . "\n";
print "Your paste is at $bin\n";
Takes no arguments. Will return the link to the newly-created paste, after a successful call to ->paste. This method is overloaded for string interpolation, meaning you can simply interpolate the WWW::Pastebin::PastebinCom::Create object in a string to insert the link to the paste.
NOTE ON VERSION 0.004 AND EARLIER π°οΈ
At version 0.004, this module was taken out the back and shot in the face, as the www.pastebin.com update completely broke it. As some code still relied on it, it was resurrected and forced to work, but large bits of module's API have changed. If for whatever reason you need the old, non-working, implementation, you can still access it on backpan and can install it using:
cpan http://backpan.perl.org/authors/id/Z/ZO/ZOFFIX/WWW-Pastebin-PastebinCom-Create-0.004.tar.gz
SEE ALSO π
WWW::Pastebin::PastebinCom::API, App::Nopaste
AUTHOR βοΈ
Zoffix Znet, "<zoffix at cpan.org>"
BUGS π
Please report any bugs or feature requests to bug-www-pastebin-pastebincom-create at rt.cpan.org, or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Pastebin-PastebinCom-Create>. 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::PastebinCom::Create
You can also look for information at:
- RT: CPAN's request tracker (report bugs here) β
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-Pastebin-PastebinCom-Create> - AnnoCPAN: Annotated CPAN documentation β
<http://annocpan.org/dist/WWW-Pastebin-PastebinCom-Create> - CPAN Ratings β
<http://cpanratings.perl.org/d/WWW-Pastebin-PastebinCom-Create> - Search CPAN β
<http://search.cpan.org/dist/WWW-Pastebin-PastebinCom-Create/>
π LICENSE AND COPYRIGHT π
okay so this is the part where we get all legal and official, but like, it's actually important bestie. Copyright 2014 Zoffix Znet. That's the whole vibe. π
This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License (2.0). You can grab the full license at:
<http://www.perlfoundation.org/artistic_license_2_0>
Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package if you do not accept this license. Like, it's giving "you can't sit with us unless you agree to the terms." π«Ά
If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license. (no cap, the chain of custody matters, iykyk β¨)
This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder. So likeβ¦ don't be out here using their branding, bestie. That's not the vibe. π
π¦ the patent part (yes, really) π¦
This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package.
And if you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed. periodt. π
πΈ Disclaimer of Warranty πΈ
lowkey the big one, so pay attention:
THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
(yes, that apostrophe after AS IS is doing its own thing, we're keeping it exactly as-is, character for character π)
and that's the whole page, bestie!! go forth and parse your PayPal buttons responsibly π
Later edition of the perl page (perl v5.32.1), last touched 2023-02-13 β and the manpage footer name is WWW::Pa...:Create(3), which is genuinely so iconic of it to truncate itself like that. slay. πβ¨
π¦ where this page comes from
- epel 9: perl-WWW-Pastebin-PastebinCom-Create 1.003-27.el9 Β· Artistic-2.0 AND (GPL-1.0-or-later OR Artistic-1.0-Perl)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms