.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "App::Nopaste 3pm" .TH App::Nopaste 3pm "2018-07-08" "perl v5.26.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" App::Nopaste \- Easy access to any pastebin .SH "VERSION" .IX Header "VERSION" version 1.012 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use App::Nopaste \*(Aqnopaste\*(Aq; \& \& my $url = nopaste(q{ \& perl \-wle \*(Aqprint "Prime" if (1 x shift) !~ /^1?$|^(11+?)\e1+$/\*(Aq [number] \& }); \& \& # or on the command line: \& nopaste test.pl \& => http://pastebin.com/fcba51f .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Pastebins (also known as nopaste sites) let you post text, usually code, for public viewing. They're used a lot in \s-1IRC\s0 channels to show code that would normally be too long to give directly in the channel (hence the name nopaste). .PP Each pastebin is slightly different. When one pastebin goes down (I'm looking at you, ), then you have to find a new one. And if you usually use a script to publish text, then it's too much hassle. .PP This module aims to smooth out the differences between pastebins, and provides redundancy: if one site doesn't work, it just tries a different one. .PP It's also modular: you only need to put on \s-1CPAN\s0 a App::Nopaste::Service::Foo module and anyone can begin using it. .SH "INTERFACE" .IX Header "INTERFACE" .SS "\s-1CLI\s0" .IX Subsection "CLI" See the documentation in App::Nopaste::Command. .ie n .SS """nopaste""" .el .SS "\f(CWnopaste\fP" .IX Subsection "nopaste" .Vb 1 \& use App::Nopaste \*(Aqnopaste\*(Aq; \& \& my $url = nopaste( \& text => "Full text to paste (the only mandatory argument)", \& desc => "A short description of the paste", \& nick => "Your nickname", \& lang => "perl", \& chan => "#moose", \& private => 1, # default: 0 \& \& # this is the default, but maybe you want to do something different \& error_handler => sub { \& my ($error, $service) = @_; \& warn "$service: $error"; \& }, \& \& warn_handler => sub { \& my ($warning, $service) = @_; \& warn "$service: $warning"; \& }, \& \& # you may specify the services to use \- but you don\*(Aqt have to \& services => ["Shadowcat", "Gist"], \& ); \& \& print $url if $url; .Ve .PP The \f(CW\*(C`nopaste\*(C'\fR function will return the \s-1URL\s0 of the paste on success, or \f(CW\*(C`undef\*(C'\fR on failure. .PP For each failure, the \f(CW\*(C`error_handler\*(C'\fR argument is invoked with the error message and the service that issued it. .PP For each warning, the \f(CW\*(C`warn_handler\*(C'\fR argument is invoked with the warning message and the service that issued it. .SH "SEE ALSO" .IX Header "SEE ALSO" WebService::NoPaste, WWW::Pastebin::PastebinCom::Create, Devel::REPL::Plugin::Nopaste .PP .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright 2008\- Shawn M Moore. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "SUPPORT" .IX Header "SUPPORT" Bugs may be submitted through the \s-1RT\s0 bug tracker (or bug\-App\-Nopaste@rt.cpan.org ). .SH "AUTHOR" .IX Header "AUTHOR" Shawn M Moore, .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" .IP "\(bu" 4 Shawn M Moore .IP "\(bu" 4 Karen Etheridge .IP "\(bu" 4 Thomas Sibley .IP "\(bu" 4 Ricardo Signes .IP "\(bu" 4 François Gannaz .IP "\(bu" 4 Justin Hunter .IP "\(bu" 4 Kevin Falcone .IP "\(bu" 4 Zoffix Znet .IP "\(bu" 4 David Golden .IP "\(bu" 4 Sergey Romanov .IP "\(bu" 4 Jesse Luehrs .IP "\(bu" 4 Rafael Kitover .IP "\(bu" 4 Dean Hamstead .IP "\(bu" 4 gregor herrmann .IP "\(bu" 4 vti .IP "\(bu" 4 Ævar Arnfjörð Bjarmason .IP "\(bu" 4 Сергей Романов .IP "\(bu" 4 Andrew Rodland .IP "\(bu" 4 יובל קוג'מן (Yuval Kogman) .IP "\(bu" 4 Arthur Axel 'fREW' Schmidt .IP "\(bu" 4 Dan Book .IP "\(bu" 4 Darian Anthony Patrick .IP "\(bu" 4 David Bremner .IP "\(bu" 4 David J. Shultz .IP "\(bu" 4 Graham Knop .IP "\(bu" 4 Jason Mills .IP "\(bu" 4 John Goulah .IP "\(bu" 4 Maximilian Gass .IP "\(bu" 4 Sebastian Paaske Tørholm .IP "\(bu" 4 Tatsuhiko Miyagawa .IP "\(bu" 4 Zakariyya Mughal .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2008 by Shawn M Moore. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.