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.012
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       ·   David Golden <dagolden@cpan.org>
119
120       ·   Sergey Romanov <complefor@rambler.ru>
121
122       ·   Jesse Luehrs <doy@tozt.net>
123
124       ·   Rafael Kitover <rkitover@cpan.org>
125
126       ·   Dean Hamstead <dean@fragfest.com.au>
127
128       ·   gregor herrmann <gregoa@debian.org>
129
130       ·   vti <viacheslav.t@gmail.com>
131
132       ·   Ævar Arnfjörð Bjarmason <avarab@gmail.com>
133
134       ·   Сергей Романов <sromanov@cpan.org>
135
136       ·   Andrew Rodland <andrew@cleverdomain.org>
137
138       ·   יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>
139
140       ·   Arthur Axel 'fREW' Schmidt <frioux@gmail.com>
141
142       ·   Dan Book <grinnz@gmail.com>
143
144       ·   Darian Anthony Patrick <dap@darianpatrick.com>
145
146       ·   David Bremner <bremner@unb.ca>
147
148       ·   David J. Shultz <djshultz@gmail.com>
149
150       ·   Graham Knop <haarg@haarg.org>
151
152       ·   Jason Mills <jmmills@cpan.org>
153
154       ·   John Goulah <jgoulah@gmail.com>
155
156       ·   Maximilian Gass <mxey@ghosthacking.net>
157
158       ·   Sebastian Paaske Tørholm <Eckankar+github@gmail.com>
159
160       ·   Tatsuhiko Miyagawa <miyagawa@bulknews.net>
161
162       ·   Zakariyya Mughal <zaki.mughal@gmail.com>
163
165       This software is copyright (c) 2008 by Shawn M Moore.
166
167       This is free software; you can redistribute it and/or modify it under
168       the same terms as the Perl 5 programming language system itself.
169
170
171
172perl v5.28.1                      2018-07-08                   App::Nopaste(3)
Impressum