1App::Nopaste(3)       User Contributed Perl Documentation      App::Nopaste(3)
2
3
4

NAME

6       App::Nopaste - Easy access to any pastebin
7

VERSION

9       version 1.013
10

SYNOPSIS

12           use App::Nopaste 'nopaste';
13
14           my $url = nopaste(q{
15               perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/' [number]
16           });
17
18           # or on the command line:
19           nopaste test.pl
20           => http://pastebin.com/fcba51f
21

DESCRIPTION

23       Pastebins (also known as nopaste sites) let you post text, usually
24       code, for public viewing. They're used a lot in IRC channels to show
25       code that would normally be too long to give directly in the channel
26       (hence the name nopaste).
27
28       Each pastebin is slightly different. When one pastebin goes down (I'm
29       looking at you, <http://paste.husk.org>), then you have to find a new
30       one. And if you usually use a script to publish text, then it's too
31       much hassle.
32
33       This module aims to smooth out the differences between pastebins, and
34       provides redundancy: if one site doesn't work, it just tries a
35       different one.
36
37       It's also modular: you only need to put on CPAN a
38       App::Nopaste::Service::Foo module and anyone can begin using it.
39

INTERFACE

41   CLI
42       See the documentation in App::Nopaste::Command.
43
44   "nopaste"
45           use App::Nopaste 'nopaste';
46
47           my $url = nopaste(
48               text => "Full text to paste (the only mandatory argument)",
49               desc => "A short description of the paste",
50               nick => "Your nickname",
51               lang => "perl",
52               chan => "#moose",
53               private => 1, # default: 0
54
55               # this is the default, but maybe you want to do something different
56               error_handler => sub {
57                   my ($error, $service) = @_;
58                   warn "$service: $error";
59               },
60
61               warn_handler => sub {
62                   my ($warning, $service) = @_;
63                   warn "$service: $warning";
64               },
65
66               # you may specify the services to use - but you don't have to
67               services => ["Shadowcat", "Gist"],
68           );
69
70           print $url if $url;
71
72       The "nopaste" function will return the URL of the paste on success, or
73       "undef" on failure.
74
75       For each failure, the "error_handler" argument is invoked with the
76       error message and the service that issued it.
77
78       For each warning, the "warn_handler" argument is invoked with the
79       warning message and the service that issued it.
80

SEE ALSO

82       WebService::NoPaste, WWW::Pastebin::PastebinCom::Create,
83       Devel::REPL::Plugin::Nopaste
84
85       <http://perladvent.org/2011/2011-12-14.html>
86
88       Copyright 2008- Shawn M Moore.
89
90       This program is free software; you can redistribute it and/or modify it
91       under the same terms as Perl itself.
92

SUPPORT

94       Bugs may be submitted through the RT bug tracker
95       <https://rt.cpan.org/Public/Dist/Display.html?Name=App-Nopaste> (or
96       bug-App-Nopaste@rt.cpan.org <mailto:bug-App-Nopaste@rt.cpan.org>).
97

AUTHOR

99       Shawn M Moore, <sartak@gmail.com>
100

CONTRIBUTORS

102       •   Shawn M Moore <code@sartak.org>
103
104       •   Karen Etheridge <ether@cpan.org>
105
106       •   Thomas Sibley <tsibley@cpan.org>
107
108       •   Ricardo Signes <rjbs@cpan.org>
109
110       •   François Gannaz <francois.gannaz@silecs.info>
111
112       •   Justin Hunter <justin.d.hunter@gmail.com>
113
114       •   Kevin Falcone <kevin@jibsheet.com>
115
116       •   Zoffix Znet <cpan@zoffix.com>
117
118       •   Jesse Luehrs <doy@tozt.net>
119
120       •   Dean Hamstead <dean@fragfest.com.au>
121
122       •   David Golden <dagolden@cpan.org>
123
124       •   Rafael Kitover <rkitover@cpan.org>
125
126       •   Sergey Romanov <complefor@rambler.ru>
127
128       •   Zakariyya Mughal <zaki.mughal@gmail.com>
129
130       •   gregor herrmann <gregoa@debian.org>
131
132       •   vti <viacheslav.t@gmail.com>
133
134       •   Ævar Arnfjörð Bjarmason <avarab@gmail.com>
135
136       •   Сергей Романов <sromanov@cpan.org>
137
138       •   Andrew Rodland <andrew@cleverdomain.org>
139
140       •   יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>
141
142       •   Arthur Axel 'fREW' Schmidt <frioux@gmail.com>
143
144       •   Dan Book <grinnz@gmail.com>
145
146       •   Darian Anthony Patrick <dap@darianpatrick.com>
147
148       •   David Bremner <bremner@unb.ca>
149
150       •   David J. Shultz <djshultz@gmail.com>
151
152       •   Graham Knop <haarg@haarg.org>
153
154       •   Jason Mills <jmmills@cpan.org>
155
156       •   John Goulah <jgoulah@gmail.com>
157
158       •   Maximilian Gass <mxey@ghosthacking.net>
159
160       •   Sebastian Paaske Tørholm <Eckankar+github@gmail.com>
161
162       •   Shlomi Fish <shlomif@shlomifish.org>
163
164       •   Tatsuhiko Miyagawa <miyagawa@bulknews.net>
165
167       This software is copyright (c) 2008 by Shawn M Moore.
168
169       This is free software; you can redistribute it and/or modify it under
170       the same terms as the Perl 5 programming language system itself.
171
172
173
174perl v5.36.0                      2022-07-22                   App::Nopaste(3)
Impressum