App-Nopaste-0.96/ 000755 000767 000024 00000000000 12272072223 014052 5 ustar 00ether staff 000000 000000 App-Nopaste-0.96/Build.PL 000644 000767 000024 00000000226 12272072223 015346 0 ustar 00ether staff 000000 000000 # This Build.PL for App-Nopaste was generated by Dist::Zilla::Plugin::ModuleBuildTiny 0.006.
use 5.008003;
use Module::Build::Tiny 0.034;
Build_PL();
App-Nopaste-0.96/Changes 000644 000767 000024 00000016260 12272072223 015352 0 ustar 00ether staff 000000 000000 Revision history for App-Nopaste
0.96 2014-01-29 03:24:58Z
- added missing prereqs
0.95 2014-01-26 17:41:29Z
- bumped the minimum version needed for the (optional) prerequisite
WWW::Pastebin::PastebinCom::Create, to avoid errors in previous
versions (thanks, Zoffix!)
0.94 2014-01-18 22:13:29Z
- updated and fixed debian and ubuntu language mappings (haarg, PR#1)
0.93 2014-01-14 00:41:21Z
- packaging converted to Dist::Zilla; handling of optional features
fixed (see RT#91053)
0.92 2013-04-26
Fix the language mappins for Ubuntu's pastebin (Sergey Romanov)
Don't need to load Moose in the tests (Sergey Romanov)
0.91 2013-01-27
Decode incoming text as utf8 (Jesse Luehrs)
Support for GITHUB_USER and GITHUB_PASS (Rafael Kitover)
Name the gist file `nopaste` not `nopaste.txt` for possible syntax highlighting (Rafael Kitover)
Use decode_json not a regular expression to decode Gist response body (Shawn M Moore)
Give a hint to perldoc App::Nopaste::Service::Gist on 401 (Shawn M Moore)
0.90 2012-10-30
Port from Moose and MooseX::Getopt to Getopt::Long::Descriptive (frew)
App::Nopaste is not using any interesting Moose features,
so it doesn't make sense to pay the startup cost (even
though it's probably dominated by network latency)
Please report any regressions!
0.35 2012-07-17
Don't barf when gist-ing STDIN. (Ricardo SIGNES)
0.34 2012-07-14
Support for GitHub's v3 API [Вячеслав Тихановский (vti)]
Thanks also to Ricardo SIGNES for the call to arms:
http://rjbs.manxome.org/rubric/entry/1964
0.33 2011-12-15
Support for --description in Gist (zengargoyle@gmail.com) [rt.cpan.org #73272]
0.32 2011-10-21
Better error reporting (David Golden)
Fix some attribution errors (Salvatore Bonaccorso) [rt.cpan.org #70434]
0.31 2011-08-30
Better filenames for ssh service (Thomas Sibley)
0.30 2011-08-26
Fix App::Nopaste::ssh's new filename description feature (Kevin Falcone)
0.29 2011-08-22
Add --private to several services (François Gannaz)
Use Class::Load instead of require "Module/Name.pm" (Shawn M Moore)
Document --list and --private options (François Gannaz)
Less hardcoding of argument names to better support subclassing (Jason Mills)
New Ubuntu service (http://paste.ubuntu.com/) (gregoa@debian.org)
SSH: Add a small suggested Apache conf that's useful for paste directories (Thomas Sibley)
SSH: optionally use the supplied description in the paste filename (Thomas Sibley)
0.28 2011-03-22
If LWP is producing errors, *report them* (Ricardo SIGNES)
0.27 2011-03-10
Correct path to Pastie (Sebastian Paaske Tørholm )
Throw an error if you specify -p and files (Shawn M Moore)
Remove Mathbin; doy moved it to a separate dist (Shawn M Moore)
0.26 2011-02-23
Add --open (-o) for opening the nopaste in your browser (Thomas Sibley)
0.25 2011-01-03
Add support for $GITHUB_USER/$GITHUB_TOKEN to Gist service (Maximilian Gass)
0.24 2010-12-21
Gist requires https (Ricardo SIGNES)
0.23 2010-11-26
Preserve the source file's extension for ssh (Thomas Sibley)
Use Config::GitLike instead of Config::INI::Reader (Thomas Sibley)
Doc fixes (Thomas Sibley, Justin Hunter)
Code style fixes (Shawn M Moore)
Remove Rafb (Justin Hunter)
Remove Husk (Shawn M Moore)
0.22 2010-06-10 12:58:00
Add NOPASTE_SSH_MODE for chmod'ing after uploading (Thomas Sibley)
0.21 2010-05-01 09:32:10
Add a --list_services/-L option (David Bremner) [rt.cpan.org #55562]
Add --private support, used in Gist (John Goulah)
Doc fix (Salvatore Bonaccorso) [rt.cpan.org #53249]
Doc fix (Fabien Wernli) [rt.cpan.org #54928]
Mention 'nopaste' script (Damyan Ivanov) [rt.cpan.org #51065]
0.20 2010-04-16 23:05:10
App::Nopaste::Service::Pastie would generate warnings via
Mechanize due to changes in http://pastie.org HTML (avar)
Add App::Nopaste::Service::Codepeek (arcanez)
0.19 2010-02-21 15:39:27
Remove rafb.net support since it's been shut down
- See also http://rafb.net/paste/
0.18 2009-12-30 16:04:45
Add ssh support (obra, jibsheet)
0.17 2009-11-02 13:20:24
fix Gist support harder by using the API rather than scraping (rjbs)
Improve --lang support for Debian (gregoa@debian.org) [rt.cpan.org #47911]
0.16 2009-10-16 14:32:09
Fix Gist support (ckuskie@sterling.net) [rt.cpan.org #50500]
Add --lang support to Debian (gregoa@debian.org) [rt.cpan.org #47911]
0.15 2009-07-15 05:01:36
MANIFEST is really hard! :(
0.14 2009-07-15 04:48:15
No code changes
0.13 2009-07-15 04:47:21
Add support for paste.debian.net (Ryan Niebur)
0.12 2009-07-13 19:35:10
Don't explicitly (optionally) depend on Git, but use it if
we have it (Sartak)
0.11 2009-06-18 17:20:51
Service::Gist: use file_ext instead of file_name (nothingmuch)
Bump Moose dependencies to avoid deprecation warnings
Doc typo fix (rafl)
0.10 2009-01-28 18:48:55
I was a little too aggressive in my s/user/login/ (Sartak)
0.09 2009-01-28 18:34:31
The parameter for gist is "user" not "login" (Ricardo SIGNES)
0.08 2009-01-22 21:44:51
Optional authentication for Gist, by Ricardo SIGNES.
0.07 2009-01-16 16:04:45
Gist (github) support by Ricardo SIGNES.
Pastie support.
0.06 2008-12-03 21:50:36
Silence the "exiting eval via next" warning
0.05 2008-08-29 15:03:10
Allow specific pastebins to say "I don't want to be picked by default"
Apply this to Mathbin
0.04 2008-06-11 00:48:53
Add Mathbin courtesy of doy
Add an "available" method to services which checks Perl dependencies
Add a warn_handler
Refactor the CLI into App::Nopaste::Command, using MooseX::Getopt:
-x/--copy for automatically copying the URL to your clipboard
-p/--paste for automatically taking the clipboard as input
-q/--quiet for silencing warnings
-d/--desc for setting the one-line description
-n/--nick for setting the nickname to something other than $USER
-l/--lang for setting the language to something other than Perl
-c/--chan for setting the channel, so pastebots auto-announce
-s/--services for setting the services to try
0.03 2008-05-06 04:31:08
App::Nopaste will now look at environment variables instead of nopaste
Better handling of weird argument counts to nopaste
If $NOPASTE_NICK is unavailable, use $USER
Fix dependency declarations
Default error handler now includes service name
0.02 2008-04-17 20:25:29
Use #!/usr/bin/perl instead of #!/usr/bin/env perl so M:I replaces it
0.01 2008-03-09 07:48:49
First version, released on an unsuspecting world.
App-Nopaste-0.96/CONTRIBUTING 000644 000767 000024 00000005073 12272072223 015711 0 ustar 00ether staff 000000 000000
CONTRIBUTING
Thank you for considering contributing to this distribution. This file
contains instructions that will help you work with the source code.
The distribution is managed with Dist::Zilla. This means than many of the
usual files you might expect are not in the repository, but are generated
at release time (e.g. Makefile.PL).
However, you can run tests directly using the 'prove' tool:
$ prove -l
$ prove -lv t/some_test_file.t
$ prove -lvr t/
In most cases, 'prove' is entirely sufficent for you to test any
patches you have.
You may need to satisfy some dependencies. The easiest way to satisfy
dependencies is to install the last release -- this is available at
https://metacpan.org/release/App-Nopaste.
If you use cpanminus, you can do it without downloading the tarball first:
$ cpanm --reinstall --installdeps --with-recommends App::Nopaste
Dist::Zilla is a very powerful authoring tool, but requires a number of
author-specific plugins. If you would like to use it for contributing,
install it from CPAN, then run one of the following commands, depending on
your CPAN client:
$ cpan `dzil authordeps --missing`
$ dzil authordeps --missing | cpanm
You should then also install any additional requirements not needed by the
dzil build but may be needed by tests or other development:
# cpan `dzil listdeps --author --missing`
$ dzil listdeps --author --missing | cpanm
You can also do this via cpanm directly:
$ cpanm --reinstall --installdeps --with-develop --with-recommends App::Nopaste
Once installed, here are some dzil commands you might try:
$ dzil build
$ dzil test
$ dzil test --release
$ dzil xtest
$ dzil listdeps --json
$ dzil build --notgz
You can learn more about Dist::Zilla at http://dzil.org/.
The code for this distribution is hosted at GitHub. The repository is:
https://github.com/karenetheridge/App-Nopaste
You can submit code changes by forking the repository, pushing your code
changes to your clone, and then submitting a pull request. Detailed
instructions for doing that is available here:
https://help.github.com/
https://help.github.com/articles/creating-a-pull-request
If you have found a bug, but do not have an accompanying patch to fix it, you
can submit an issue report here:
https://rt.cpan.org/Public/Dist/Display.html?Name=App-Nopaste
or via bug-App-Nopaste@rt.cpan.org.
This is a good place to send your questions about the usage of this distribution.
This file was generated via Dist::Zilla::Plugin::GenerateFile::ShareDir 0.005 from a
template file originating in Dist-Zilla-PluginBundle-Author-ETHER-0.049.
App-Nopaste-0.96/dist.ini 000644 000767 000024 00000002051 12272072223 015514 0 ustar 00ether staff 000000 000000 name = App-Nopaste
author = Shawn M Moore,
license = Perl_5
copyright_holder = Shawn M Moore
copyright_year = 2008
[PodVersion]
[@Author::ETHER]
Authority.authority = cpan:SARTAK
Git::NextVersion.version_regexp = ^([\d._]+)(-TRIAL)?$
Git::Tag.tag_format = %v%t
Test::MinimumVersion.max_target_perl = 5.008003
-remove = PodWeaver
-remove = PodCoverageTests ; TODO
-remove = Test::PodSpelling ; TODO
-remove = Test::Pod::No404s ; TODO
-remove = Test::UnusedVars ; TODO
[ContributorsFromGit]
[OptionalFeature / pastebin]
-description = pastebin.com support
-always_recommend = 1
-default = 0
WWW::Pastebin::PastebinCom::Create = 1.003
[OptionalFeature / Clipboard]
-description = copying of URLs with -x/--copy
-always_recommend = 1
-default = 0
Clipboard = 0
[OptionalFeature / scp]
-description = copy files to remote server with scp
-always_recommend = 1
-default = 1
File::Temp = 0
File::Spec = 0
[OptionalFeature / browser]
-description = open URLs in a browser
-always_recommend = 1
-default = 0
Browser::Open = 0
App-Nopaste-0.96/INSTALL 000644 000767 000024 00000001674 12272072223 015113 0 ustar 00ether staff 000000 000000
This is the Perl distribution App-Nopaste.
Installing App-Nopaste is straightforward.
## Installation with cpanm
If you have cpanm, you only need one line:
% cpanm App::Nopaste
If you are installing into a system-wide directory, you may need to pass the
"-S" flag to cpanm, which uses sudo to install the module:
% cpanm -S App::Nopaste
## Installing with the CPAN shell
Alternatively, if your CPAN shell is set up, you should just be able to do:
% cpan App::Nopaste
## Manual installation
As a last resort, you can manually install it. Download the tarball, untar it,
then build it:
% perl Build.PL
% ./Build && ./Build test
Then install it:
% ./Build install
If you are installing into a system-wide directory, you may need to run:
% sudo ./Build install
## Documentation
App-Nopaste documentation is available as POD.
You can run perldoc from a shell to read the documentation:
% perldoc App::Nopaste
App-Nopaste-0.96/lib/ 000755 000767 000024 00000000000 12272072223 014620 5 ustar 00ether staff 000000 000000 App-Nopaste-0.96/LICENSE 000644 000767 000024 00000043656 12272072223 015075 0 ustar 00ether staff 000000 000000 This software is copyright (c) 2008 by Shawn M Moore.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
Terms of the Perl programming language system itself
a) the GNU General Public License as published by the Free
Software Foundation; either version 1, or (at your option) any
later version, or
b) the "Artistic License"
--- The GNU General Public License, Version 1, February 1989 ---
This software is Copyright (c) 2008 by Shawn M Moore.
This is free software, licensed under:
The GNU General Public License, Version 1, February 1989
GNU GENERAL PUBLIC LICENSE
Version 1, February 1989
Copyright (C) 1989 Free Software Foundation, Inc.
51 Franklin St, Suite 500, Boston, MA 02110-1335 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The license agreements of most software companies try to keep users
at the mercy of those companies. By contrast, our General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. The
General Public License applies to the Free Software Foundation's
software and to any other program whose authors commit to using it.
You can use it for your programs, too.
When we speak of free software, we are referring to freedom, not
price. Specifically, the General Public License is designed to make
sure that you have the freedom to give away or sell copies of free
software, that you receive source code or can get it if you want it,
that you can change the software or use pieces of it in new free
programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of a such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must tell them their rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any program or other work which
contains a notice placed by the copyright holder saying it may be
distributed under the terms of this General Public License. The
"Program", below, refers to any such program or work, and a "work based
on the Program" means either the Program or any work containing the
Program or a portion of it, either verbatim or with modifications. Each
licensee is addressed as "you".
1. You may copy and distribute verbatim copies of the Program's source
code as you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and
disclaimer of warranty; keep intact all the notices that refer to this
General Public License and to the absence of any warranty; and give any
other recipients of the Program a copy of this General Public License
along with the Program. You may charge a fee for the physical act of
transferring a copy.
2. You may modify your copy or copies of the Program or any portion of
it, and copy and distribute such modifications under the terms of Paragraph
1 above, provided that you also do the following:
a) cause the modified files to carry prominent notices stating that
you changed the files and the date of any change; and
b) cause the whole of any work that you distribute or publish, that
in whole or in part contains the Program or any part thereof, either
with or without modifications, to be licensed at no charge to all
third parties under the terms of this General Public License (except
that you may choose to grant warranty protection to some or all
third parties, at your option).
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
Public License.
d) You may charge a fee for the physical act of transferring a
copy, and you may at your option offer warranty protection in
exchange for a fee.
Mere aggregation of another independent work with the Program (or its
derivative) on a volume of a storage or distribution medium does not bring
the other work under the scope of these terms.
3. You may copy and distribute the Program (or a portion or derivative of
it, under Paragraph 2) in object code or executable form under the terms of
Paragraphs 1 and 2 above provided that you also do one of the following:
a) accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of
Paragraphs 1 and 2 above; or,
b) accompany it with a written offer, valid for at least three
years, to give any third party free (except for a nominal charge
for the cost of distribution) a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of
Paragraphs 1 and 2 above; or,
c) accompany it with the information you received as to where the
corresponding source code may be obtained. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form alone.)
Source code for a work means the preferred form of the work for making
modifications to it. For an executable file, complete source code means
all the source code for all modules it contains; but, as a special
exception, it need not include source code for modules which are standard
libraries that accompany the operating system on which the executable
file runs, or for standard header files or definitions files that
accompany that operating system.
4. You may not copy, modify, sublicense, distribute or transfer the
Program except as expressly provided under this General Public License.
Any attempt otherwise to copy, modify, sublicense, distribute or transfer
the Program is void, and will automatically terminate your rights to use
the Program under this License. However, parties who have received
copies, or rights to use copies, from you under this General Public
License will not have their licenses terminated so long as such parties
remain in full compliance.
5. By copying, distributing or modifying the Program (or any work based
on the Program) you indicate your acceptance of this license to do so,
and all its terms and conditions.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the original
licensor to copy, distribute or modify the Program subject to these
terms and conditions. You may not impose any further restrictions on the
recipients' exercise of the rights granted herein.
7. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of the license which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
the license, you may choose any version ever published by the Free Software
Foundation.
8. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
Copyright (C) 19yy
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the
appropriate parts of the General Public License. Of course, the
commands you use may be called something other than `show w' and `show
c'; they could even be mouse-clicks or menu items--whatever suits your
program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
program `Gnomovision' (a program to direct compilers to make passes
at assemblers) written by James Hacker.
, 1 April 1989
Ty Coon, President of Vice
That's all there is to it!
--- The Artistic License 1.0 ---
This software is Copyright (c) 2008 by Shawn M Moore.
This is free software, licensed under:
The Artistic License 1.0
The Artistic License
Preamble
The intent of this document is to state the conditions under which a Package
may be copied, such that the Copyright Holder maintains some semblance of
artistic control over the development of the package, while giving the users of
the package the right to use and distribute the Package in a more-or-less
customary fashion, plus the right to make reasonable modifications.
Definitions:
- "Package" refers to the collection of files distributed by the Copyright
Holder, and derivatives of that collection of files created through
textual modification.
- "Standard Version" refers to such a Package if it has not been modified,
or has been modified in accordance with the wishes of the Copyright
Holder.
- "Copyright Holder" is whoever is named in the copyright or copyrights for
the package.
- "You" is you, if you're thinking about copying or distributing this Package.
- "Reasonable copying fee" is whatever you can justify on the basis of media
cost, duplication charges, time of people involved, and so on. (You will
not be required to justify it to the Copyright Holder, but only to the
computing community at large as a market that must bear the fee.)
- "Freely Available" means that no fee is charged for the item itself, though
there may be fees involved in handling the item. It also means that
recipients of the item may redistribute it under the same conditions they
received it.
1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.
2. You may apply bug fixes, portability fixes and other modifications derived
from the Public Domain or from the Copyright Holder. A Package modified in such
a way shall still be considered the Standard Version.
3. You may otherwise modify your copy of this Package in any way, provided that
you insert a prominent notice in each changed file stating how and when you
changed that file, and provided that you do at least ONE of the following:
a) place your modifications in the Public Domain or otherwise make them
Freely Available, such as by posting said modifications to Usenet or an
equivalent medium, or placing the modifications on a major archive site
such as ftp.uu.net, or by allowing the Copyright Holder to include your
modifications in the Standard Version of the Package.
b) use the modified Package only within your corporation or organization.
c) rename any non-standard executables so the names do not conflict with
standard executables, which must also be provided, and provide a separate
manual page for each non-standard executable that clearly documents how it
differs from the Standard Version.
d) make other distribution arrangements with the Copyright Holder.
4. You may distribute the programs of this Package in object code or executable
form, provided that you do at least ONE of the following:
a) distribute a Standard Version of the executables and library files,
together with instructions (in the manual page or equivalent) on where to
get the Standard Version.
b) accompany the distribution with the machine-readable source of the Package
with your modifications.
c) accompany any non-standard executables with their corresponding Standard
Version executables, giving the non-standard executables non-standard
names, and clearly documenting the differences in manual pages (or
equivalent), together with instructions on where to get the Standard
Version.
d) make other distribution arrangements with the Copyright Holder.
5. You may charge a reasonable copying fee for any distribution of this
Package. You may charge any fee you choose for support of this Package. You
may not charge a fee for this Package itself. However, you may distribute this
Package in aggregate with other (possibly commercial) programs as part of a
larger (possibly commercial) software distribution provided that you do not
advertise this Package as a product of your own.
6. The scripts and library files supplied as input to or produced as output
from the programs of this Package do not automatically fall under the copyright
of this Package, but belong to whomever generated them, and may be sold
commercially, and may be aggregated with this Package.
7. C or perl subroutines supplied by you and linked into this Package shall not
be considered part of this Package.
8. The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written permission.
9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The End
App-Nopaste-0.96/Makefile.PL 000644 000767 000024 00000007365 12272072223 016037 0 ustar 00ether staff 000000 000000 # This Makefile.PL for App-Nopaste was generated by
# Dist::Zilla::Plugin::MakeMaker::Fallback 0.006
# and Dist::Zilla::Plugin::MakeMaker::Awesome 0.19.
# Don't edit it but the dist.ini and plugins used to construct it.
use strict;
use warnings;
BEGIN {
my %configure_requires = (
'ExtUtils::MakeMaker' => '6.30',
'Module::Build::Tiny' => '0.034',
);
my @missing = grep {
! eval "require $_; $_->VERSION($configure_requires{$_}); 1"
} keys %configure_requires;
if (not @missing)
{
print "Congratulations, your toolchain understands 'configure_requires'!\n\n";
}
else
{
$ENV{PERL_MM_FALLBACK_SILENCE_WARNING} or warn <<'EOW';
*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***
If you're seeing this warning, your toolchain is really, really old* and you'll
almost certainly have problems installing CPAN modules from this century. But
never fear, dear user, for we have the technology to fix this!
If you're using CPAN.pm to install things, then you can upgrade it using:
cpan CPAN
If you're using CPANPLUS to install things, then you can upgrade it using:
cpanp CPANPLUS
If you're using cpanminus, you shouldn't be seeing this message in the first
place, so please file an issue on github.
If you're installing manually, please retrain your fingers to run Build.PL
when present instead.
This public service announcement was brought to you by the Perl Toolchain
Gang, the irc.perl.org #toolchain IRC channel, and the number 42.
----
* Alternatively, you are doing something overly clever, in which case you
should consider setting the 'prefer_installer' config option in CPAN.pm, or
'prefer_makefile' in CPANPLUS, to 'mb" and '0' respectively.
You can also silence this warning for future installations by setting the
PERL_MM_FALLBACK_SILENCE_WARNING environment variable.
EOW
sleep 10 if -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT));
}
}
use 5.008003;
use ExtUtils::MakeMaker 6.30;
my %WriteMakefileArgs = (
"ABSTRACT" => "easy access to any pastebin",
"AUTHOR" => "Shawn M Moore, ",
"BUILD_REQUIRES" => {},
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => "6.30",
"Module::Build::Tiny" => "0.034"
},
"DISTNAME" => "App-Nopaste",
"EXE_FILES" => [
"script/nopaste"
],
"LICENSE" => "perl",
"NAME" => "App::Nopaste",
"PREREQ_PM" => {
"Class::Load" => 0,
"Exporter" => 0,
"File::Basename" => 0,
"File::Spec" => 0,
"File::Temp" => 0,
"Getopt::Long::Descriptive" => 0,
"JSON" => 0,
"Module::Pluggable" => 0,
"Module::Runtime" => 0,
"POSIX" => 0,
"URI::Escape" => 0,
"WWW::Mechanize" => 0,
"base" => 0,
"strict" => 0,
"warnings" => 0
},
"TEST_REQUIRES" => {
"ExtUtils::MakeMaker" => 0,
"File::Spec::Functions" => 0,
"LWP::Protocol" => 0,
"List::Util" => 0,
"Test::More" => 0,
"version" => 0
},
"VERSION" => "0.96",
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
"Class::Load" => 0,
"Exporter" => 0,
"ExtUtils::MakeMaker" => 0,
"File::Basename" => 0,
"File::Spec" => 0,
"File::Spec::Functions" => 0,
"File::Temp" => 0,
"Getopt::Long::Descriptive" => 0,
"JSON" => 0,
"LWP::Protocol" => 0,
"List::Util" => 0,
"Module::Pluggable" => 0,
"Module::Runtime" => 0,
"POSIX" => 0,
"Test::More" => 0,
"URI::Escape" => 0,
"WWW::Mechanize" => 0,
"base" => 0,
"strict" => 0,
"version" => 0,
"warnings" => 0
);
unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
delete $WriteMakefileArgs{TEST_REQUIRES};
delete $WriteMakefileArgs{BUILD_REQUIRES};
$WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
}
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
WriteMakefile(%WriteMakefileArgs);
App-Nopaste-0.96/MANIFEST 000644 000767 000024 00000001673 12272072223 015212 0 ustar 00ether staff 000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.012.
Build.PL
CONTRIBUTING
Changes
INSTALL
LICENSE
MANIFEST
META.json
META.yml
Makefile.PL
README
README.md
dist.ini
lib/App/Nopaste.pm
lib/App/Nopaste/Command.pm
lib/App/Nopaste/Service.pm
lib/App/Nopaste/Service/Codepeek.pm
lib/App/Nopaste/Service/Debian.pm
lib/App/Nopaste/Service/Gist.pm
lib/App/Nopaste/Service/PastebinCom.pm
lib/App/Nopaste/Service/Pastie.pm
lib/App/Nopaste/Service/Shadowcat.pm
lib/App/Nopaste/Service/Snitch.pm
lib/App/Nopaste/Service/Ubuntu.pm
lib/App/Nopaste/Service/ssh.pm
script/nopaste
t/00-report-prereqs.t
t/000-load.t
t/001-subclass_cmd.t
t/002-encoding.t
xt/author/00-compile.t
xt/release/changes_has_content.t
xt/release/cpan-changes.t
xt/release/distmeta.t
xt/release/eol.t
xt/release/kwalitee.t
xt/release/minimum-version.t
xt/release/mojibake.t
xt/release/no-tabs.t
xt/release/pod-syntax.t
xt/release/portability.t
xt/release/test-version.t
App-Nopaste-0.96/META.json 000644 000767 000024 00000062714 12272072223 015505 0 ustar 00ether staff 000000 000000 {
"abstract" : "easy access to any pastebin",
"author" : [
"Shawn M Moore, "
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 5.012, CPAN::Meta::Converter version 2.133380",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : "2"
},
"name" : "App-Nopaste",
"no_index" : {
"directory" : [
"t",
"xt",
"examples",
"share"
]
},
"optional_features" : {
"Clipboard" : {
"description" : "copying of URLs with -x/--copy",
"prereqs" : {
"runtime" : {
"requires" : {
"Clipboard" : "0"
}
}
},
"x_default" : "0"
},
"browser" : {
"description" : "open URLs in a browser",
"prereqs" : {
"runtime" : {
"requires" : {
"Browser::Open" : "0"
}
}
},
"x_default" : "0"
},
"pastebin" : {
"description" : "pastebin.com support",
"prereqs" : {
"runtime" : {
"requires" : {
"WWW::Pastebin::PastebinCom::Create" : "1.003"
}
}
},
"x_default" : "0"
},
"scp" : {
"description" : "copy files to remote server with scp",
"prereqs" : {
"runtime" : {
"requires" : {
"File::Spec" : "0",
"File::Temp" : "0"
}
}
},
"x_default" : "1"
}
},
"prereqs" : {
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "6.30",
"Module::Build::Tiny" : "0.034"
}
},
"develop" : {
"recommends" : {
"Dist::Zilla::PluginBundle::Author::ETHER" : "0.049"
},
"requires" : {
"Browser::Open" : "0",
"Clipboard" : "0",
"Dist::Zilla" : "5.012",
"Dist::Zilla::Plugin::ContributorsFromGit" : "0",
"Dist::Zilla::Plugin::GitHub::Update" : "0",
"Dist::Zilla::Plugin::GithubMeta" : "0",
"Dist::Zilla::Plugin::MakeMaker::Fallback" : "0",
"Dist::Zilla::Plugin::ModuleBuildTiny" : "0.004",
"Dist::Zilla::Plugin::OptionalFeature" : "0",
"Dist::Zilla::Plugin::PodVersion" : "0",
"Dist::Zilla::PluginBundle::Author::ETHER" : "0",
"File::Spec" : "0",
"File::Temp" : "0",
"IO::Handle" : "0",
"IPC::Open3" : "0",
"Test::CPAN::Changes" : "0.19",
"Test::CPAN::Meta" : "0",
"Test::Kwalitee" : "1.12",
"Test::More" : "0.94",
"Test::NoTabs" : "0",
"Test::Pod" : "1.41",
"WWW::Pastebin::PastebinCom::Create" : "1.003"
}
},
"runtime" : {
"recommends" : {
"Browser::Open" : "0",
"Clipboard" : "0",
"File::Spec" : "0",
"File::Temp" : "0",
"WWW::Pastebin::PastebinCom::Create" : "1.003"
},
"requires" : {
"Class::Load" : "0",
"Exporter" : "0",
"File::Basename" : "0",
"File::Spec" : "0",
"File::Temp" : "0",
"Getopt::Long::Descriptive" : "0",
"JSON" : "0",
"Module::Pluggable" : "0",
"Module::Runtime" : "0",
"POSIX" : "0",
"URI::Escape" : "0",
"WWW::Mechanize" : "0",
"base" : "0",
"perl" : "5.008003",
"strict" : "0",
"warnings" : "0"
}
},
"test" : {
"recommends" : {
"CPAN::Meta" : "0",
"CPAN::Meta::Requirements" : "2.120900"
},
"requires" : {
"ExtUtils::MakeMaker" : "0",
"File::Spec::Functions" : "0",
"LWP::Protocol" : "0",
"List::Util" : "0",
"Test::More" : "0",
"version" : "0"
}
}
},
"provides" : {
"App::Nopaste" : {
"file" : "lib/App/Nopaste.pm",
"version" : "0.96"
},
"App::Nopaste::Command" : {
"file" : "lib/App/Nopaste/Command.pm",
"version" : "0.96"
},
"App::Nopaste::Service" : {
"file" : "lib/App/Nopaste/Service.pm",
"version" : "0.96"
},
"App::Nopaste::Service::Codepeek" : {
"file" : "lib/App/Nopaste/Service/Codepeek.pm",
"version" : "0.96"
},
"App::Nopaste::Service::Debian" : {
"file" : "lib/App/Nopaste/Service/Debian.pm",
"version" : "0.96"
},
"App::Nopaste::Service::Gist" : {
"file" : "lib/App/Nopaste/Service/Gist.pm",
"version" : "0.96"
},
"App::Nopaste::Service::PastebinCom" : {
"file" : "lib/App/Nopaste/Service/PastebinCom.pm",
"version" : "0.96"
},
"App::Nopaste::Service::Pastie" : {
"file" : "lib/App/Nopaste/Service/Pastie.pm",
"version" : "0.96"
},
"App::Nopaste::Service::Shadowcat" : {
"file" : "lib/App/Nopaste/Service/Shadowcat.pm",
"version" : "0.96"
},
"App::Nopaste::Service::Snitch" : {
"file" : "lib/App/Nopaste/Service/Snitch.pm",
"version" : "0.96"
},
"App::Nopaste::Service::Ubuntu" : {
"file" : "lib/App/Nopaste/Service/Ubuntu.pm",
"version" : "0.96"
},
"App::Nopaste::Service::ssh" : {
"file" : "lib/App/Nopaste/Service/ssh.pm",
"version" : "0.96"
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"mailto" : "bug-App-Nopaste@rt.cpan.org",
"web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=App-Nopaste"
},
"homepage" : "https://github.com/karenetheridge/App-Nopaste",
"repository" : {
"type" : "git",
"url" : "https://github.com/karenetheridge/App-Nopaste.git",
"web" : "https://github.com/karenetheridge/App-Nopaste"
}
},
"version" : "0.96",
"x_Dist_Zilla" : {
"perl" : {
"version" : "5.019007"
},
"plugins" : [
{
"class" : "Dist::Zilla::Plugin::PodVersion",
"name" : "PodVersion",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::Git::NextVersion",
"name" : "@Author::ETHER/Git::NextVersion",
"version" : "2.019"
},
{
"class" : "Dist::Zilla::Plugin::PromptIfStale",
"config" : {
"Dist::Zilla::Plugin::PromptIfStale" : {
"check_all_plugins" : 0,
"check_all_prereqs" : 0,
"modules" : [
"Dist::Zilla::PluginBundle::Author::ETHER"
],
"phase" : "build",
"skip" : []
}
},
"name" : "@Author::ETHER/build",
"version" : "0.015"
},
{
"class" : "Dist::Zilla::Plugin::PromptIfStale",
"config" : {
"Dist::Zilla::Plugin::PromptIfStale" : {
"check_all_plugins" : "1",
"check_all_prereqs" : "1",
"modules" : [],
"phase" : "release",
"skip" : []
}
},
"name" : "@Author::ETHER/release",
"version" : "0.015"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@Author::ETHER/ExecDir",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@Author::ETHER/ShareDir",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::FileFinder::ByName",
"name" : "@Author::ETHER/Examples",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::Git::GatherDir",
"name" : "@Author::ETHER/Git::GatherDir",
"version" : "2.019"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@Author::ETHER/MetaYAML",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@Author::ETHER/MetaJSON",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@Author::ETHER/License",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::Readme",
"name" : "@Author::ETHER/Readme",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@Author::ETHER/Manifest",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::GenerateFile::ShareDir",
"config" : {
"Dist::Zilla::Plugin::GenerateFile::ShareDir" : {
"destination_filename" : "CONTRIBUTING",
"dist" : "Dist-Zilla-PluginBundle-Author-ETHER",
"encoding" : "UTF-8",
"source_filename" : "CONTRIBUTING"
}
},
"name" : "@Author::ETHER/generate CONTRIBUTING",
"version" : "0.005"
},
{
"class" : "Dist::Zilla::Plugin::Test::Compile",
"config" : {
"Dist::Zilla::Plugin::Test::Compile" : {
"filename" : "xt/author/00-compile.t",
"module_finder" : [
":InstallModules"
],
"script_finder" : [
":ExecFiles",
"@Author::ETHER/Examples"
]
}
},
"name" : "@Author::ETHER/Test::Compile",
"version" : "2.039"
},
{
"class" : "Dist::Zilla::Plugin::Test::NoTabs",
"config" : {
"Dist::Zilla::Plugin::Test::NoTabs" : {
"module_finder" : [
":InstallModules"
],
"script_finder" : [
":ExecFiles",
"@Author::ETHER/Examples"
]
}
},
"name" : "@Author::ETHER/Test::NoTabs",
"version" : "0.06"
},
{
"class" : "Dist::Zilla::Plugin::EOLTests",
"name" : "@Author::ETHER/EOLTests",
"version" : "0.02"
},
{
"class" : "Dist::Zilla::Plugin::MetaTests",
"name" : "@Author::ETHER/MetaTests",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::Test::Version",
"name" : "@Author::ETHER/Test::Version",
"version" : "0.002004"
},
{
"class" : "Dist::Zilla::Plugin::Test::CPAN::Changes",
"name" : "@Author::ETHER/Test::CPAN::Changes",
"version" : "0.008"
},
{
"class" : "Dist::Zilla::Plugin::Test::ChangesHasContent",
"name" : "@Author::ETHER/Test::ChangesHasContent",
"version" : "0.006"
},
{
"class" : "Dist::Zilla::Plugin::Test::MinimumVersion",
"name" : "@Author::ETHER/Test::MinimumVersion",
"version" : "2.000005"
},
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@Author::ETHER/PodSyntaxTests",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::Test::Kwalitee",
"name" : "@Author::ETHER/Test::Kwalitee",
"version" : "2.07"
},
{
"class" : "Dist::Zilla::Plugin::MojibakeTests",
"name" : "@Author::ETHER/MojibakeTests",
"version" : "0.5"
},
{
"class" : "Dist::Zilla::Plugin::Test::ReportPrereqs",
"name" : "@Author::ETHER/Test::ReportPrereqs",
"version" : "0.013"
},
{
"class" : "Dist::Zilla::Plugin::Test::Portability",
"name" : "@Author::ETHER/Test::Portability",
"version" : "2.000005"
},
{
"class" : "Dist::Zilla::Plugin::Git::Describe",
"name" : "@Author::ETHER/Git::Describe",
"version" : "0.003"
},
{
"class" : "Dist::Zilla::Plugin::PkgVersion",
"name" : "@Author::ETHER/PkgVersion",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::Authority",
"name" : "@Author::ETHER/Authority",
"version" : "1.006"
},
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@Author::ETHER/NextRelease",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod",
"name" : "@Author::ETHER/ReadmeAnyFromPod",
"version" : "0.133360"
},
{
"class" : "Dist::Zilla::Plugin::GithubMeta",
"name" : "@Author::ETHER/GithubMeta",
"version" : "0.42"
},
{
"class" : "Dist::Zilla::Plugin::AutoMetaResources",
"name" : "@Author::ETHER/AutoMetaResources",
"version" : "1.20"
},
{
"class" : "Dist::Zilla::Plugin::MetaNoIndex",
"name" : "@Author::ETHER/MetaNoIndex",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::MetaProvides::Package",
"config" : {
"Dist::Zilla::Plugin::MetaProvides::Package" : {
"finder" : [
":InstallModules"
],
"finder_objects" : [
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
"version" : "5.012"
}
]
},
"Dist::Zilla::Role::MetaProvider::Provider" : {
"inherit_missing" : "1",
"inherit_version" : "1",
"meta_noindex" : "1"
}
},
"name" : "@Author::ETHER/MetaProvides::Package",
"version" : "1.15000003"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@Author::ETHER/MetaConfig",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::AutoPrereqs",
"name" : "@Author::ETHER/AutoPrereqs",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs::AuthorDeps",
"name" : "@Author::ETHER/Prereqs::AuthorDeps",
"version" : "0.002"
},
{
"class" : "Dist::Zilla::Plugin::MinimumPerl",
"name" : "@Author::ETHER/MinimumPerl",
"version" : "1.003"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "develop",
"type" : "requires"
}
},
"name" : "@Author::ETHER/installer_requirements",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "develop",
"type" : "recommends"
}
},
"name" : "@Author::ETHER/pluginbundle_version",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::RunExtraTests",
"name" : "@Author::ETHER/RunExtraTests",
"version" : "0.016"
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker::Fallback",
"name" : "@Author::ETHER/MakeMaker::Fallback",
"version" : "0.006"
},
{
"class" : "Dist::Zilla::Plugin::ModuleBuildTiny",
"name" : "@Author::ETHER/ModuleBuildTiny",
"version" : "0.006"
},
{
"class" : "Dist::Zilla::Plugin::InstallGuide",
"name" : "@Author::ETHER/InstallGuide",
"version" : "1.200002"
},
{
"class" : "Dist::Zilla::Plugin::CheckSelfDependency",
"config" : {
"Dist::Zilla::Plugin::CheckSelfDependency" : {
"finder" : [
":InstallModules"
]
}
},
"name" : "@Author::ETHER/CheckSelfDependency",
"version" : "0.007"
},
{
"class" : "Dist::Zilla::Plugin::Run::AfterBuild",
"name" : "@Author::ETHER/Run::AfterBuild",
"version" : "0.020"
},
{
"class" : "Dist::Zilla::Plugin::Git::Check",
"name" : "@Author::ETHER/initial check",
"version" : "2.019"
},
{
"class" : "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts",
"name" : "@Author::ETHER/Git::CheckFor::MergeConflicts",
"version" : "0.009"
},
{
"class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch",
"name" : "@Author::ETHER/Git::CheckFor::CorrectBranch",
"version" : "0.009"
},
{
"class" : "Dist::Zilla::Plugin::Git::Remote::Check",
"name" : "@Author::ETHER/Git::Remote::Check",
"version" : "0.2.0"
},
{
"class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed",
"name" : "@Author::ETHER/CheckPrereqsIndexed",
"version" : "0.010"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@Author::ETHER/TestRelease",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::Git::Check",
"name" : "@Author::ETHER/after tests",
"version" : "2.019"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@Author::ETHER/UploadToCPAN",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::CopyFilesFromRelease",
"name" : "@Author::ETHER/CopyFilesFromRelease",
"version" : "0.001"
},
{
"class" : "Dist::Zilla::Plugin::Git::Commit",
"name" : "@Author::ETHER/Git::Commit",
"version" : "2.019"
},
{
"class" : "Dist::Zilla::Plugin::Git::Tag",
"name" : "@Author::ETHER/Git::Tag",
"version" : "2.019"
},
{
"class" : "Dist::Zilla::Plugin::GitHub::Update",
"name" : "@Author::ETHER/GitHub::Update",
"version" : "0.36"
},
{
"class" : "Dist::Zilla::Plugin::Git::Push",
"name" : "@Author::ETHER/Git::Push",
"version" : "2.019"
},
{
"class" : "Dist::Zilla::Plugin::InstallRelease",
"name" : "@Author::ETHER/InstallRelease",
"version" : "0.008"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
"config" : {
"Dist::Zilla::Plugin::Prereqs" : {
"phase" : "develop",
"type" : "requires"
}
},
"name" : "@Author::ETHER/via_options",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@Author::ETHER/ConfirmRelease",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::ContributorsFromGit",
"name" : "ContributorsFromGit",
"version" : "0.006"
},
{
"class" : "Dist::Zilla::Plugin::OptionalFeature",
"config" : {
"Dist::Zilla::Plugin::OptionalFeature" : {
"always_recommend" : "1",
"default" : "0",
"description" : "pastebin.com support",
"name" : "pastebin",
"phase" : "runtime",
"prereqs" : {
"WWW::Pastebin::PastebinCom::Create" : "1.003"
},
"require_develop" : "1",
"type" : "requires"
}
},
"name" : "pastebin",
"version" : "0.011"
},
{
"class" : "Dist::Zilla::Plugin::OptionalFeature",
"config" : {
"Dist::Zilla::Plugin::OptionalFeature" : {
"always_recommend" : "1",
"default" : "0",
"description" : "copying of URLs with -x/--copy",
"name" : "Clipboard",
"phase" : "runtime",
"prereqs" : {
"Clipboard" : "0"
},
"require_develop" : "1",
"type" : "requires"
}
},
"name" : "Clipboard",
"version" : "0.011"
},
{
"class" : "Dist::Zilla::Plugin::OptionalFeature",
"config" : {
"Dist::Zilla::Plugin::OptionalFeature" : {
"always_recommend" : "1",
"default" : "1",
"description" : "copy files to remote server with scp",
"name" : "scp",
"phase" : "runtime",
"prereqs" : {
"File::Spec" : "0",
"File::Temp" : "0"
},
"require_develop" : "1",
"type" : "requires"
}
},
"name" : "scp",
"version" : "0.011"
},
{
"class" : "Dist::Zilla::Plugin::OptionalFeature",
"config" : {
"Dist::Zilla::Plugin::OptionalFeature" : {
"always_recommend" : "1",
"default" : "0",
"description" : "open URLs in a browser",
"name" : "browser",
"phase" : "runtime",
"prereqs" : {
"Browser::Open" : "0"
},
"require_develop" : "1",
"type" : "requires"
}
},
"name" : "browser",
"version" : "0.011"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":IncModules",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":MainModule",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":AllFiles",
"version" : "5.012"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":NoFiles",
"version" : "5.012"
}
],
"zilla" : {
"class" : "Dist::Zilla::Dist::Builder",
"config" : {
"is_trial" : "0"
},
"version" : "5.012"
}
},
"x_authority" : "cpan:SARTAK",
"x_contributors" : [
"Arthur Axel 'fREW' Schmidt ",
"David Bremner ",
"David Golden ",
"Fran\u00e7ois Gannaz ",
"Graham Knop ",
"Jason Mills ",
"Jesse Luehrs ",
"John Goulah ",
"Justin Hunter ",
"Karen Etheridge ",
"Kevin Falcone ",
"Maximilian Gass ",
"Rafael Kitover ",
"Ricardo Signes ",
"Sebastian Paaske T\u00f8rholm ",
"Sergey Romanov ",
"Shawn M Moore ",
"Shawn M Moore ",
"Shawn M Moore ",
"Thomas Sibley ",
"Thomas Sibley ",
"Thomas Sibley ",
"Yuval Kogman ",
"Zoffix Znet ",
"gregor herrmann ",
"jluehrs2 ",
"vti ",
"\u00c6var Arnfj\u00f6r\u00f0 Bjarmason "
]
}
App-Nopaste-0.96/META.yml 000644 000767 000024 00000037602 12272072223 015333 0 ustar 00ether staff 000000 000000 ---
abstract: 'easy access to any pastebin'
author:
- 'Shawn M Moore, '
build_requires:
ExtUtils::MakeMaker: 0
File::Spec::Functions: 0
LWP::Protocol: 0
List::Util: 0
Test::More: 0
version: 0
configure_requires:
ExtUtils::MakeMaker: 6.30
Module::Build::Tiny: 0.034
dynamic_config: 0
generated_by: 'Dist::Zilla version 5.012, CPAN::Meta::Converter version 2.133380'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: App-Nopaste
no_index:
directory:
- t
- xt
- examples
- share
optional_features:
Clipboard:
description: 'copying of URLs with -x/--copy'
requires:
Clipboard: 0
browser:
description: 'open URLs in a browser'
requires:
Browser::Open: 0
pastebin:
description: 'pastebin.com support'
requires:
WWW::Pastebin::PastebinCom::Create: 1.003
scp:
description: 'copy files to remote server with scp'
requires:
File::Spec: 0
File::Temp: 0
provides:
App::Nopaste:
file: lib/App/Nopaste.pm
version: 0.96
App::Nopaste::Command:
file: lib/App/Nopaste/Command.pm
version: 0.96
App::Nopaste::Service:
file: lib/App/Nopaste/Service.pm
version: 0.96
App::Nopaste::Service::Codepeek:
file: lib/App/Nopaste/Service/Codepeek.pm
version: 0.96
App::Nopaste::Service::Debian:
file: lib/App/Nopaste/Service/Debian.pm
version: 0.96
App::Nopaste::Service::Gist:
file: lib/App/Nopaste/Service/Gist.pm
version: 0.96
App::Nopaste::Service::PastebinCom:
file: lib/App/Nopaste/Service/PastebinCom.pm
version: 0.96
App::Nopaste::Service::Pastie:
file: lib/App/Nopaste/Service/Pastie.pm
version: 0.96
App::Nopaste::Service::Shadowcat:
file: lib/App/Nopaste/Service/Shadowcat.pm
version: 0.96
App::Nopaste::Service::Snitch:
file: lib/App/Nopaste/Service/Snitch.pm
version: 0.96
App::Nopaste::Service::Ubuntu:
file: lib/App/Nopaste/Service/Ubuntu.pm
version: 0.96
App::Nopaste::Service::ssh:
file: lib/App/Nopaste/Service/ssh.pm
version: 0.96
recommends:
Browser::Open: 0
Clipboard: 0
File::Spec: 0
File::Temp: 0
WWW::Pastebin::PastebinCom::Create: 1.003
requires:
Class::Load: 0
Exporter: 0
File::Basename: 0
File::Spec: 0
File::Temp: 0
Getopt::Long::Descriptive: 0
JSON: 0
Module::Pluggable: 0
Module::Runtime: 0
POSIX: 0
URI::Escape: 0
WWW::Mechanize: 0
base: 0
perl: 5.008003
strict: 0
warnings: 0
resources:
bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=App-Nopaste
homepage: https://github.com/karenetheridge/App-Nopaste
repository: https://github.com/karenetheridge/App-Nopaste.git
version: 0.96
x_Dist_Zilla:
perl:
version: 5.019007
plugins:
-
class: Dist::Zilla::Plugin::PodVersion
name: PodVersion
version: 5.012
-
class: Dist::Zilla::Plugin::Git::NextVersion
name: '@Author::ETHER/Git::NextVersion'
version: 2.019
-
class: Dist::Zilla::Plugin::PromptIfStale
config:
Dist::Zilla::Plugin::PromptIfStale:
check_all_plugins: 0
check_all_prereqs: 0
modules:
- Dist::Zilla::PluginBundle::Author::ETHER
phase: build
skip: []
name: '@Author::ETHER/build'
version: 0.015
-
class: Dist::Zilla::Plugin::PromptIfStale
config:
Dist::Zilla::Plugin::PromptIfStale:
check_all_plugins: 1
check_all_prereqs: 1
modules: []
phase: release
skip: []
name: '@Author::ETHER/release'
version: 0.015
-
class: Dist::Zilla::Plugin::ExecDir
name: '@Author::ETHER/ExecDir'
version: 5.012
-
class: Dist::Zilla::Plugin::ShareDir
name: '@Author::ETHER/ShareDir'
version: 5.012
-
class: Dist::Zilla::Plugin::FileFinder::ByName
name: '@Author::ETHER/Examples'
version: 5.012
-
class: Dist::Zilla::Plugin::Git::GatherDir
name: '@Author::ETHER/Git::GatherDir'
version: 2.019
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@Author::ETHER/MetaYAML'
version: 5.012
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@Author::ETHER/MetaJSON'
version: 5.012
-
class: Dist::Zilla::Plugin::License
name: '@Author::ETHER/License'
version: 5.012
-
class: Dist::Zilla::Plugin::Readme
name: '@Author::ETHER/Readme'
version: 5.012
-
class: Dist::Zilla::Plugin::Manifest
name: '@Author::ETHER/Manifest'
version: 5.012
-
class: Dist::Zilla::Plugin::GenerateFile::ShareDir
config:
Dist::Zilla::Plugin::GenerateFile::ShareDir:
destination_filename: CONTRIBUTING
dist: Dist-Zilla-PluginBundle-Author-ETHER
encoding: UTF-8
source_filename: CONTRIBUTING
name: '@Author::ETHER/generate CONTRIBUTING'
version: 0.005
-
class: Dist::Zilla::Plugin::Test::Compile
config:
Dist::Zilla::Plugin::Test::Compile:
filename: xt/author/00-compile.t
module_finder:
- ':InstallModules'
script_finder:
- ':ExecFiles'
- '@Author::ETHER/Examples'
name: '@Author::ETHER/Test::Compile'
version: 2.039
-
class: Dist::Zilla::Plugin::Test::NoTabs
config:
Dist::Zilla::Plugin::Test::NoTabs:
module_finder:
- ':InstallModules'
script_finder:
- ':ExecFiles'
- '@Author::ETHER/Examples'
name: '@Author::ETHER/Test::NoTabs'
version: 0.06
-
class: Dist::Zilla::Plugin::EOLTests
name: '@Author::ETHER/EOLTests'
version: 0.02
-
class: Dist::Zilla::Plugin::MetaTests
name: '@Author::ETHER/MetaTests'
version: 5.012
-
class: Dist::Zilla::Plugin::Test::Version
name: '@Author::ETHER/Test::Version'
version: 0.002004
-
class: Dist::Zilla::Plugin::Test::CPAN::Changes
name: '@Author::ETHER/Test::CPAN::Changes'
version: 0.008
-
class: Dist::Zilla::Plugin::Test::ChangesHasContent
name: '@Author::ETHER/Test::ChangesHasContent'
version: 0.006
-
class: Dist::Zilla::Plugin::Test::MinimumVersion
name: '@Author::ETHER/Test::MinimumVersion'
version: 2.000005
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@Author::ETHER/PodSyntaxTests'
version: 5.012
-
class: Dist::Zilla::Plugin::Test::Kwalitee
name: '@Author::ETHER/Test::Kwalitee'
version: 2.07
-
class: Dist::Zilla::Plugin::MojibakeTests
name: '@Author::ETHER/MojibakeTests'
version: 0.5
-
class: Dist::Zilla::Plugin::Test::ReportPrereqs
name: '@Author::ETHER/Test::ReportPrereqs'
version: 0.013
-
class: Dist::Zilla::Plugin::Test::Portability
name: '@Author::ETHER/Test::Portability'
version: 2.000005
-
class: Dist::Zilla::Plugin::Git::Describe
name: '@Author::ETHER/Git::Describe'
version: 0.003
-
class: Dist::Zilla::Plugin::PkgVersion
name: '@Author::ETHER/PkgVersion'
version: 5.012
-
class: Dist::Zilla::Plugin::Authority
name: '@Author::ETHER/Authority'
version: 1.006
-
class: Dist::Zilla::Plugin::NextRelease
name: '@Author::ETHER/NextRelease'
version: 5.012
-
class: Dist::Zilla::Plugin::ReadmeAnyFromPod
name: '@Author::ETHER/ReadmeAnyFromPod'
version: 0.133360
-
class: Dist::Zilla::Plugin::GithubMeta
name: '@Author::ETHER/GithubMeta'
version: 0.42
-
class: Dist::Zilla::Plugin::AutoMetaResources
name: '@Author::ETHER/AutoMetaResources'
version: 1.20
-
class: Dist::Zilla::Plugin::MetaNoIndex
name: '@Author::ETHER/MetaNoIndex'
version: 5.012
-
class: Dist::Zilla::Plugin::MetaProvides::Package
config:
Dist::Zilla::Plugin::MetaProvides::Package:
finder:
- ':InstallModules'
finder_objects:
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
version: 5.012
Dist::Zilla::Role::MetaProvider::Provider:
inherit_missing: 1
inherit_version: 1
meta_noindex: 1
name: '@Author::ETHER/MetaProvides::Package'
version: 1.15000003
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@Author::ETHER/MetaConfig'
version: 5.012
-
class: Dist::Zilla::Plugin::AutoPrereqs
name: '@Author::ETHER/AutoPrereqs'
version: 5.012
-
class: Dist::Zilla::Plugin::Prereqs::AuthorDeps
name: '@Author::ETHER/Prereqs::AuthorDeps'
version: 0.002
-
class: Dist::Zilla::Plugin::MinimumPerl
name: '@Author::ETHER/MinimumPerl'
version: 1.003
-
class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: develop
type: requires
name: '@Author::ETHER/installer_requirements'
version: 5.012
-
class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: develop
type: recommends
name: '@Author::ETHER/pluginbundle_version'
version: 5.012
-
class: Dist::Zilla::Plugin::RunExtraTests
name: '@Author::ETHER/RunExtraTests'
version: 0.016
-
class: Dist::Zilla::Plugin::MakeMaker::Fallback
name: '@Author::ETHER/MakeMaker::Fallback'
version: 0.006
-
class: Dist::Zilla::Plugin::ModuleBuildTiny
name: '@Author::ETHER/ModuleBuildTiny'
version: 0.006
-
class: Dist::Zilla::Plugin::InstallGuide
name: '@Author::ETHER/InstallGuide'
version: 1.200002
-
class: Dist::Zilla::Plugin::CheckSelfDependency
config:
Dist::Zilla::Plugin::CheckSelfDependency:
finder:
- ':InstallModules'
name: '@Author::ETHER/CheckSelfDependency'
version: 0.007
-
class: Dist::Zilla::Plugin::Run::AfterBuild
name: '@Author::ETHER/Run::AfterBuild'
version: 0.020
-
class: Dist::Zilla::Plugin::Git::Check
name: '@Author::ETHER/initial check'
version: 2.019
-
class: Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts
name: '@Author::ETHER/Git::CheckFor::MergeConflicts'
version: 0.009
-
class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch
name: '@Author::ETHER/Git::CheckFor::CorrectBranch'
version: 0.009
-
class: Dist::Zilla::Plugin::Git::Remote::Check
name: '@Author::ETHER/Git::Remote::Check'
version: 0.2.0
-
class: Dist::Zilla::Plugin::CheckPrereqsIndexed
name: '@Author::ETHER/CheckPrereqsIndexed'
version: 0.010
-
class: Dist::Zilla::Plugin::TestRelease
name: '@Author::ETHER/TestRelease'
version: 5.012
-
class: Dist::Zilla::Plugin::Git::Check
name: '@Author::ETHER/after tests'
version: 2.019
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@Author::ETHER/UploadToCPAN'
version: 5.012
-
class: Dist::Zilla::Plugin::CopyFilesFromRelease
name: '@Author::ETHER/CopyFilesFromRelease'
version: 0.001
-
class: Dist::Zilla::Plugin::Git::Commit
name: '@Author::ETHER/Git::Commit'
version: 2.019
-
class: Dist::Zilla::Plugin::Git::Tag
name: '@Author::ETHER/Git::Tag'
version: 2.019
-
class: Dist::Zilla::Plugin::GitHub::Update
name: '@Author::ETHER/GitHub::Update'
version: 0.36
-
class: Dist::Zilla::Plugin::Git::Push
name: '@Author::ETHER/Git::Push'
version: 2.019
-
class: Dist::Zilla::Plugin::InstallRelease
name: '@Author::ETHER/InstallRelease'
version: 0.008
-
class: Dist::Zilla::Plugin::Prereqs
config:
Dist::Zilla::Plugin::Prereqs:
phase: develop
type: requires
name: '@Author::ETHER/via_options'
version: 5.012
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@Author::ETHER/ConfirmRelease'
version: 5.012
-
class: Dist::Zilla::Plugin::ContributorsFromGit
name: ContributorsFromGit
version: 0.006
-
class: Dist::Zilla::Plugin::OptionalFeature
config:
Dist::Zilla::Plugin::OptionalFeature:
always_recommend: 1
default: 0
description: 'pastebin.com support'
name: pastebin
phase: runtime
prereqs:
WWW::Pastebin::PastebinCom::Create: 1.003
require_develop: 1
type: requires
name: pastebin
version: 0.011
-
class: Dist::Zilla::Plugin::OptionalFeature
config:
Dist::Zilla::Plugin::OptionalFeature:
always_recommend: 1
default: 0
description: 'copying of URLs with -x/--copy'
name: Clipboard
phase: runtime
prereqs:
Clipboard: 0
require_develop: 1
type: requires
name: Clipboard
version: 0.011
-
class: Dist::Zilla::Plugin::OptionalFeature
config:
Dist::Zilla::Plugin::OptionalFeature:
always_recommend: 1
default: 1
description: 'copy files to remote server with scp'
name: scp
phase: runtime
prereqs:
File::Spec: 0
File::Temp: 0
require_develop: 1
type: requires
name: scp
version: 0.011
-
class: Dist::Zilla::Plugin::OptionalFeature
config:
Dist::Zilla::Plugin::OptionalFeature:
always_recommend: 1
default: 0
description: 'open URLs in a browser'
name: browser
phase: runtime
prereqs:
Browser::Open: 0
require_develop: 1
type: requires
name: browser
version: 0.011
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
version: 5.012
-
class: Dist::Zilla::Plugin::FinderCode
name: ':IncModules'
version: 5.012
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
version: 5.012
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
version: 5.012
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
version: 5.012
-
class: Dist::Zilla::Plugin::FinderCode
name: ':MainModule'
version: 5.012
-
class: Dist::Zilla::Plugin::FinderCode
name: ':AllFiles'
version: 5.012
-
class: Dist::Zilla::Plugin::FinderCode
name: ':NoFiles'
version: 5.012
zilla:
class: Dist::Zilla::Dist::Builder
config:
is_trial: 0
version: 5.012
x_authority: cpan:SARTAK
x_contributors:
- "Arthur Axel 'fREW' Schmidt "
- 'David Bremner '
- 'David Golden '
- 'François Gannaz '
- 'Graham Knop '
- 'Jason Mills '
- 'Jesse Luehrs '
- 'John Goulah '
- 'Justin Hunter '
- 'Karen Etheridge '
- 'Kevin Falcone '
- 'Maximilian Gass '
- 'Rafael Kitover '
- 'Ricardo Signes '
- 'Sebastian Paaske Tørholm '
- 'Sergey Romanov '
- 'Shawn M Moore '
- 'Shawn M Moore '
- 'Shawn M Moore '
- 'Thomas Sibley '
- 'Thomas Sibley '
- 'Thomas Sibley '
- 'Yuval Kogman '
- 'Zoffix Znet '
- 'gregor herrmann '
- 'jluehrs2 '
- 'vti '
- 'Ævar Arnfjörð Bjarmason '
App-Nopaste-0.96/README 000644 000767 000024 00000000553 12272072223 014735 0 ustar 00ether staff 000000 000000
This archive contains the distribution App-Nopaste,
version 0.96:
easy access to any pastebin
This software is copyright (c) 2008 by Shawn M Moore.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
This README file was generated by Dist::Zilla::Plugin::Readme v5.012.
App-Nopaste-0.96/README.md 000644 000767 000024 00000005545 12272072223 015342 0 ustar 00ether staff 000000 000000 # NAME
App::Nopaste - easy access to any pastebin
# VERSION
version 0.96
# SYNOPSIS
use App::Nopaste 'nopaste';
my $url = nopaste(q{
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/' [number]
});
# or on the command line:
nopaste test.pl
=> http://pastebin.com/fcba51f
# DESCRIPTION
Pastebins (also known as nopaste sites) let you post text, usually code, for
public viewing. They're used a lot in IRC channels to show code that would
normally be too long to give directly in the channel (hence the name nopaste).
Each pastebin is slightly different. When one pastebin goes down (I'm looking
at you, [http://paste.husk.org](http://paste.husk.org)), then you have to find a new one. And if you
usually use a script to publish text, then it's too much hassle.
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.
It's also modular: you only need to put on CPAN a
[App::Nopaste::Service::Foo](https://metacpan.org/pod/App::Nopaste::Service::Foo) module and anyone can begin using it.
# INTERFACE
## CLI
See the documentation in [App::Nopaste::Command](https://metacpan.org/pod/App::Nopaste::Command).
## `nopaste`
use App::Nopaste 'nopaste';
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't have to
services => ["Shadowcat", "Gist"],
);
print $url if $url;
The `nopaste` function will return the URL of the paste on
success, or `undef` on failure.
For each failure, the `error_handler` argument is invoked with the error
message and the service that issued it.
For each warning, the `warn_handler` argument is invoked with the warning
message and the service that issued it.
# SEE ALSO
[WebService::NoPaste](https://metacpan.org/pod/WebService::NoPaste), [WWW::Pastebin::PastebinCom::Create](https://metacpan.org/pod/WWW::Pastebin::PastebinCom::Create), [Devel::REPL::Plugin::Nopaste](https://metacpan.org/pod/Devel::REPL::Plugin::Nopaste)
[http://perladvent.org/2011/2011-12-14.html](http://perladvent.org/2011/2011-12-14.html)
# AUTHOR
Shawn M Moore, `sartak@gmail.com`
# COPYRIGHT AND LICENSE
Copyright 2008- Shawn M Moore.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
App-Nopaste-0.96/script/ 000755 000767 000024 00000000000 12272072223 015356 5 ustar 00ether staff 000000 000000 App-Nopaste-0.96/t/ 000755 000767 000024 00000000000 12272072223 014315 5 ustar 00ether staff 000000 000000 App-Nopaste-0.96/xt/ 000755 000767 000024 00000000000 12272072223 014505 5 ustar 00ether staff 000000 000000 App-Nopaste-0.96/xt/author/ 000755 000767 000024 00000000000 12272072223 016007 5 ustar 00ether staff 000000 000000 App-Nopaste-0.96/xt/release/ 000755 000767 000024 00000000000 12272072223 016125 5 ustar 00ether staff 000000 000000 App-Nopaste-0.96/xt/release/changes_has_content.t 000644 000767 000024 00000002010 12272072223 022300 0 ustar 00ether staff 000000 000000 #!perl
use Test::More tests => 2;
note 'Checking Changes';
my $changes_file = 'Changes';
my $newver = '0.96';
my $trial_token = '-TRIAL';
SKIP: {
ok(-e $changes_file, "$changes_file file exists")
or skip 'Changes is missing', 1;
ok(_get_changes($newver), "$changes_file has content for $newver");
}
done_testing;
# _get_changes copied and adapted from Dist::Zilla::Plugin::Git::Commit
# by Jerome Quelin
sub _get_changes
{
my $newver = shift;
# parse changelog to find commit message
open(my $fh, '<', $changes_file) or die "cannot open $changes_file: $!";
my $changelog = join('', <$fh>);
close $fh;
my @content =
grep { /^$newver(?:$trial_token)?(?:\s+|$)/ ... /^\S/ } # from newver to un-indented
split /\n/, $changelog;
shift @content; # drop the version line
# drop unindented last line and trailing blank lines
pop @content while ( @content && $content[-1] =~ /^(?:\S|\s*$)/ );
# return number of non-blank lines
return scalar @content;
}
App-Nopaste-0.96/xt/release/cpan-changes.t 000644 000767 000024 00000000263 12272072223 020642 0 ustar 00ether staff 000000 000000 #!perl
use strict;
use warnings;
use Test::More 0.96 tests => 2;
use_ok('Test::CPAN::Changes');
subtest 'changes_ok' => sub {
changes_file_ok('Changes');
};
done_testing();
App-Nopaste-0.96/xt/release/distmeta.t 000644 000767 000024 00000000332 12272072223 020122 0 ustar 00ether staff 000000 000000 #!perl
# This file was automatically generated by Dist::Zilla::Plugin::MetaTests.
use Test::More;
eval "use Test::CPAN::Meta";
plan skip_all => "Test::CPAN::Meta required for testing META.yml" if $@;
meta_yaml_ok();
App-Nopaste-0.96/xt/release/eol.t 000644 000767 000024 00000000240 12272072223 017065 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
use Test::More;
eval 'use Test::EOL';
plan skip_all => 'Test::EOL required' if $@;
all_perl_files_ok({ trailing_whitespace => 1 });
App-Nopaste-0.96/xt/release/kwalitee.t 000644 000767 000024 00000000166 12272072223 020122 0 ustar 00ether staff 000000 000000 # this test was generated with Dist::Zilla::Plugin::Test::Kwalitee 2.07
use strict;
use warnings;
use Test::Kwalitee;
App-Nopaste-0.96/xt/release/minimum-version.t 000644 000767 000024 00000000271 12272072223 021450 0 ustar 00ether staff 000000 000000 #!perl
use Test::More;
eval "use Test::MinimumVersion";
plan skip_all => "Test::MinimumVersion required for testing minimum versions"
if $@;
all_minimum_version_ok( qq{5.008003} );
App-Nopaste-0.96/xt/release/mojibake.t 000644 000767 000024 00000000406 12272072223 020073 0 ustar 00ether staff 000000 000000 #!perl
use strict;
use warnings qw(all);
use Test::More;
## no critic (ProhibitStringyEval, RequireCheckingReturnValueOfEval)
eval q(use Test::Mojibake);
plan skip_all => q(Test::Mojibake required for source encoding testing) if $@;
all_files_encoding_ok();
App-Nopaste-0.96/xt/release/no-tabs.t 000644 000767 000024 00000001261 12272072223 017655 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
# this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.06
use Test::More 0.88;
use Test::NoTabs;
my @files = (
'lib/App/Nopaste.pm',
'lib/App/Nopaste/Command.pm',
'lib/App/Nopaste/Service.pm',
'lib/App/Nopaste/Service/Codepeek.pm',
'lib/App/Nopaste/Service/Debian.pm',
'lib/App/Nopaste/Service/Gist.pm',
'lib/App/Nopaste/Service/PastebinCom.pm',
'lib/App/Nopaste/Service/Pastie.pm',
'lib/App/Nopaste/Service/Shadowcat.pm',
'lib/App/Nopaste/Service/Snitch.pm',
'lib/App/Nopaste/Service/Ubuntu.pm',
'lib/App/Nopaste/Service/ssh.pm',
'script/nopaste'
);
notabs_ok($_) foreach @files;
done_testing;
App-Nopaste-0.96/xt/release/pod-syntax.t 000644 000767 000024 00000000332 12272072223 020416 0 ustar 00ether staff 000000 000000 #!perl
# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
use Test::More;
eval "use Test::Pod 1.41";
plan skip_all => "Test::Pod 1.41 required for testing POD" if $@;
all_pod_files_ok();
App-Nopaste-0.96/xt/release/portability.t 000644 000767 000024 00000000276 12272072223 020661 0 ustar 00ether staff 000000 000000 #!perl
use strict;
use warnings;
use Test::More;
eval 'use Test::Portability::Files';
plan skip_all => 'Test::Portability::Files required for testing portability'
if $@;
run_tests();
App-Nopaste-0.96/xt/release/test-version.t 000644 000767 000024 00000000643 12272072223 020757 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
use Test::More;
# generated by Dist::Zilla::Plugin::Test::Version 0.002004
BEGIN { eval "use Test::Version; 1;" or die $@; }
my @imports = ( 'version_all_ok' );
my $params = {
is_strict => 1,
has_version => 1,
};
push @imports, $params
if version->parse( $Test::Version::VERSION ) >= version->parse('1.002');
Test::Version->import(@imports);
version_all_ok;
done_testing;
App-Nopaste-0.96/xt/author/00-compile.t 000644 000767 000024 00000004373 12272072223 020050 0 ustar 00ether staff 000000 000000 use 5.006;
use strict;
use warnings;
# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.039
use Test::More 0.94 tests => 13 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
my @module_files = (
'App/Nopaste.pm',
'App/Nopaste/Command.pm',
'App/Nopaste/Service.pm',
'App/Nopaste/Service/Codepeek.pm',
'App/Nopaste/Service/Debian.pm',
'App/Nopaste/Service/Gist.pm',
'App/Nopaste/Service/PastebinCom.pm',
'App/Nopaste/Service/Pastie.pm',
'App/Nopaste/Service/Shadowcat.pm',
'App/Nopaste/Service/Snitch.pm',
'App/Nopaste/Service/Ubuntu.pm',
'App/Nopaste/Service/ssh.pm'
);
my @scripts = (
'script/nopaste'
);
# no fake home requested
my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib';
use File::Spec;
use IPC::Open3;
use IO::Handle;
open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
my @warnings;
for my $lib (@module_files)
{
# see L
my $stderr = IO::Handle->new;
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
if (@_warnings)
{
warn @_warnings;
push @warnings, @_warnings;
}
}
foreach my $file (@scripts)
{ SKIP: {
open my $fh, '<', $file or warn("Unable to open $file: $!"), next;
my $line = <$fh>;
close $fh and skip("$file isn't perl", 1) unless $line =~ /^#!.*?\bperl\b\s*(.*)$/;
my @flags = $1 ? split(/\s+/, $1) : ();
my $stderr = IO::Handle->new;
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, @flags, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
# in older perls, -c output is simply the file portion of the path being tested
if (@_warnings = grep { !/\bsyntax OK$/ }
grep { chomp; $_ ne (File::Spec->splitpath($file))[2] } @_warnings)
{
warn @_warnings;
push @warnings, @_warnings;
}
} }
is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING};
BAIL_OUT("Compilation problems") if !Test::More->builder->is_passing;
App-Nopaste-0.96/t/00-report-prereqs.t 000644 000767 000024 00000020112 12272072223 017705 0 ustar 00ether staff 000000 000000 #!perl
use strict;
use warnings;
# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.013
use Test::More tests => 1;
use ExtUtils::MakeMaker;
use File::Spec::Functions;
use List::Util qw/max/;
use version;
# hide optional CPAN::Meta modules from prereq scanner
# and check if they are available
my $cpan_meta = "CPAN::Meta";
my $cpan_meta_req = "CPAN::Meta::Requirements";
my $HAS_CPAN_META = eval "require $cpan_meta"; ## no critic
my $HAS_CPAN_META_REQ = eval "require $cpan_meta_req; $cpan_meta_req->VERSION('2.120900')";
# Verify requirements?
my $DO_VERIFY_PREREQS = 1;
sub _merge_requires {
my ($collector, $prereqs) = @_;
for my $phase ( qw/configure build test runtime develop/ ) {
next unless exists $prereqs->{$phase};
if ( my $req = $prereqs->{$phase}{'requires'} ) {
my $cmr = CPAN::Meta::Requirements->from_string_hash( $req );
$collector->add_requirements( $cmr );
}
}
}
my %include = map {; $_ => 1 } qw(
);
my %exclude = map {; $_ => 1 } qw(
);
# Add static prereqs to the included modules list
my $static_prereqs = do { my $x = {
'configure' => {
'requires' => {
'ExtUtils::MakeMaker' => '6.30',
'Module::Build::Tiny' => '0.034'
}
},
'develop' => {
'recommends' => {
'Dist::Zilla::PluginBundle::Author::ETHER' => '0.049'
},
'requires' => {
'Browser::Open' => '0',
'Clipboard' => '0',
'Dist::Zilla' => '5.012',
'Dist::Zilla::Plugin::ContributorsFromGit' => '0',
'Dist::Zilla::Plugin::GitHub::Update' => '0',
'Dist::Zilla::Plugin::GithubMeta' => '0',
'Dist::Zilla::Plugin::MakeMaker::Fallback' => '0',
'Dist::Zilla::Plugin::ModuleBuildTiny' => '0.004',
'Dist::Zilla::Plugin::OptionalFeature' => '0',
'Dist::Zilla::Plugin::PodVersion' => '0',
'Dist::Zilla::PluginBundle::Author::ETHER' => '0',
'File::Spec' => '0',
'File::Temp' => '0',
'IO::Handle' => '0',
'IPC::Open3' => '0',
'Test::CPAN::Changes' => '0.19',
'Test::CPAN::Meta' => '0',
'Test::Kwalitee' => '1.12',
'Test::More' => '0.94',
'Test::NoTabs' => '0',
'Test::Pod' => '1.41',
'WWW::Pastebin::PastebinCom::Create' => '1.003'
}
},
'runtime' => {
'recommends' => {
'Browser::Open' => '0',
'Clipboard' => '0',
'File::Spec' => '0',
'File::Temp' => '0',
'WWW::Pastebin::PastebinCom::Create' => '1.003'
},
'requires' => {
'Class::Load' => '0',
'Exporter' => '0',
'File::Basename' => '0',
'File::Spec' => '0',
'File::Temp' => '0',
'Getopt::Long::Descriptive' => '0',
'JSON' => '0',
'Module::Pluggable' => '0',
'Module::Runtime' => '0',
'POSIX' => '0',
'URI::Escape' => '0',
'WWW::Mechanize' => '0',
'base' => '0',
'perl' => '5.008003',
'strict' => '0',
'warnings' => '0'
}
},
'test' => {
'recommends' => {
'CPAN::Meta' => '0',
'CPAN::Meta::Requirements' => '2.120900'
},
'requires' => {
'ExtUtils::MakeMaker' => '0',
'File::Spec::Functions' => '0',
'LWP::Protocol' => '0',
'List::Util' => '0',
'Test::More' => '0',
'version' => '0'
}
}
};
$x;
};
delete $static_prereqs->{develop} if not $ENV{AUTHOR_TESTING};
$include{$_} = 1 for map { keys %$_ } map { values %$_ } values %$static_prereqs;
# Merge requirements for major phases (if we can)
my $all_requires;
if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META_REQ ) {
$all_requires = $cpan_meta_req->new;
_merge_requires($all_requires, $static_prereqs);
}
# Add dynamic prereqs to the included modules list (if we can)
my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml';
if ( $source && $HAS_CPAN_META ) {
if ( my $meta = eval { CPAN::Meta->load_file($source) } ) {
my $dynamic_prereqs = $meta->prereqs;
delete $dynamic_prereqs->{develop} if not $ENV{AUTHOR_TESTING};
$include{$_} = 1 for map { keys %$_ } map { values %$_ } values %$dynamic_prereqs;
if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META_REQ ) {
_merge_requires($all_requires, $dynamic_prereqs);
}
}
}
else {
$source = 'static metadata';
}
my @modules = sort grep { ! $exclude{$_} } keys %include;
my @reports = [qw/Version Module/];
my @dep_errors;
my $req_hash = defined($all_requires) ? $all_requires->as_string_hash : {};
for my $mod ( @modules ) {
next if $mod eq 'perl';
my $file = $mod;
$file =~ s{::}{/}g;
$file .= ".pm";
my ($prefix) = grep { -e catfile($_, $file) } @INC;
if ( $prefix ) {
my $ver = MM->parse_version( catfile($prefix, $file) );
$ver = "undef" unless defined $ver; # Newer MM should do this anyway
push @reports, [$ver, $mod];
if ( $DO_VERIFY_PREREQS && $all_requires ) {
my $req = $req_hash->{$mod};
if ( defined $req && length $req ) {
if ( ! defined eval { version->parse($ver) } ) {
push @dep_errors, "$mod version '$ver' cannot be parsed (version '$req' required)";
}
elsif ( ! $all_requires->accepts_module( $mod => $ver ) ) {
push @dep_errors, "$mod version '$ver' is not in required range '$req'";
}
}
}
}
else {
push @reports, ["missing", $mod];
if ( $DO_VERIFY_PREREQS && $all_requires ) {
my $req = $req_hash->{$mod};
if ( defined $req && length $req ) {
push @dep_errors, "$mod is not installed (version '$req' required)";
}
}
}
}
if ( @reports ) {
my $vl = max map { length $_->[0] } @reports;
my $ml = max map { length $_->[1] } @reports;
splice @reports, 1, 0, ["-" x $vl, "-" x $ml];
diag "\nVersions for all modules listed in $source (including optional ones):\n",
map {sprintf(" %*s %*s\n",$vl,$_->[0],-$ml,$_->[1])} @reports;
}
if ( @dep_errors ) {
diag join("\n",
"\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n",
"The following REQUIRED prerequisites were not satisfied:\n",
@dep_errors,
"\n"
);
}
pass;
# vim: ts=4 sts=4 sw=4 et:
App-Nopaste-0.96/t/000-load.t 000755 000767 000024 00000000663 12272072223 015726 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
use Test::More tests => 10;
use_ok 'App::Nopaste';
use_ok 'App::Nopaste::Service';
use_ok 'App::Nopaste::Service::Codepeek';
use_ok 'App::Nopaste::Service::Debian';
use_ok 'App::Nopaste::Service::Gist';
use_ok 'App::Nopaste::Service::PastebinCom';
use_ok 'App::Nopaste::Service::Pastie';
use_ok 'App::Nopaste::Service::Shadowcat';
use_ok 'App::Nopaste::Service::Snitch';
use_ok 'App::Nopaste::Service::ssh';
App-Nopaste-0.96/t/001-subclass_cmd.t 000644 000767 000024 00000001437 12272072223 017447 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
use Test::More;
{
package App::Nopaste::Service::_MyTest;
use base 'App::Nopaste::Service';
sub available { 1 }
sub uri { 'test' }
sub run {
shift;
my %a = @_;
return (1, \%a);
}
}
{
package _MyTest::Cmd;
use base 'App::Nopaste::Command';
sub read_text { 'test' }
}
my $input = {
desc => 'a test',
nick => 'person',
lang => 'text',
services => ['App::Nopaste::Service::_MyTest'],
extra_argv => []
};
my $cmd = _MyTest::Cmd->new($input);
isa_ok($cmd,'App::Nopaste::Command');
my $ret = $cmd->run;
ok(ref($ret) eq 'HASH') or diag $ret;
is($ret->{nick}, $input->{nick});
is($ret->{lang}, $input->{lang});
is($ret->{services}, $input->{services});
is($ret->{text},'test');
done_testing;
App-Nopaste-0.96/t/002-encoding.t 000644 000767 000024 00000012266 12272072223 016576 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
use Test::More;
my @content = (
<
FORM
<
Your paste, number 211360...
This content is stored as
http://paste.scsys.co.uk/211360. You will be redirected
shortly.
From: Someone at 217.168.150.38
Summary: ‘test’
‘test’
RETURN
);
my @requests;
{
package LWP::Protocol::test;
use base 'LWP::Protocol';
sub request {
my $self = shift;
my ($req) = @_;
push @requests, $req;
return HTTP::Response->new(200, 'OK', [], shift @content);
}
}
LWP::Protocol::implementor('http' => 'LWP::Protocol::test');
{
package App::Nopaste::Service::MyTest;
use base 'App::Nopaste::Service';
sub uri { 'http://localhost/' }
}
{
package MyTest::Cmd;
use base 'App::Nopaste::Command';
sub read_text { '‘test’' }
}
my $input = {
nick => '',
services => ['App::Nopaste::Service::MyTest'],
extra_argv => []
};
my $cmd = MyTest::Cmd->new($input);
isa_ok($cmd,'App::Nopaste::Command');
my $ret = $cmd->run;
is($ret, 'http://paste.scsys.co.uk/211360');
my ($post) = grep { $_->method eq 'POST' } @requests;
is($post->content, 'channel=&nick=&summary=&paste=%E2%80%98test%E2%80%99&private=0');
done_testing;
App-Nopaste-0.96/script/nopaste 000755 000767 000024 00000000535 12272072223 016760 0 ustar 00ether staff 000000 000000 #!/usr/bin/env perl
use strict;
use warnings;
use App::Nopaste::Command;
if (my $url = App::Nopaste::Command->new_with_options->run) {
print $url;
print "\n";
}
__END__
=pod
=head1 NAME
nopaste - command-line utility to nopaste
=head1 VERSION
version 0.96
=head1 DESCRIPTION
See the documentation of L.
=cut
App-Nopaste-0.96/lib/App/ 000755 000767 000024 00000000000 12272072223 015340 5 ustar 00ether staff 000000 000000 App-Nopaste-0.96/lib/App/Nopaste/ 000755 000767 000024 00000000000 12272072223 016751 5 ustar 00ether staff 000000 000000 App-Nopaste-0.96/lib/App/Nopaste.pm 000755 000767 000024 00000011336 12272072223 017316 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
package App::Nopaste;
BEGIN {
$App::Nopaste::AUTHORITY = 'cpan:SARTAK';
}
# git description: 0.95-4-g9d66c0b
$App::Nopaste::VERSION = '0.96';
use 5.008003;
use Module::Pluggable search_path => 'App::Nopaste::Service';
use Class::Load 'load_class';
use base 'Exporter';
our @EXPORT_OK = 'nopaste';
sub nopaste {
# process arguments
# allow "nopaste($text)"
unshift @_, 'text' if @_ == 1;
# only look for $self if we have odd number of arguments
my $self;
$self = @_ % 2 ? shift : __PACKAGE__;
# everything else
my %args = @_;
$args{services} = defined($ENV{NOPASTE_SERVICES})
&& [split ' ', $ENV{NOPASTE_SERVICES}]
if !defined($args{services});
$args{nick} = $ENV{NOPASTE_NICK} || $ENV{USER}
if !defined($args{nick});
my $using_default = 0;
unless (ref($args{services}) eq 'ARRAY' && @{$args{services}}) {
$using_default = 1;
$args{services} = [ $self->plugins ];
}
@{ $args{services} }
or Carp::croak "No App::Nopaste::Service module found";
defined $args{text}
or Carp::croak "You must specify the text to nopaste";
$args{error_handler} ||= sub {
my ($msg, $srv) = @_;
$msg =~ s/\n*$/\n/;
warn "$srv: $msg"
};
# try to paste to each service in order
for my $service (@{ $args{services} }) {
$service = "App::Nopaste::Service::$service"
unless $service =~ /^App::Nopaste::Service/;
no warnings 'exiting';
my @ret = eval {
local $SIG{__WARN__} = sub {
$args{warn_handler}->($_[0], $service);
} if $args{warn_handler};
load_class($service);
next unless $service->available(%args);
next if $using_default && $service->forbid_in_default;
$service->nopaste(%args);
};
@ret = (0, $@) if $@;
# success!
return $ret[1] if $ret[0];
# failure!
$args{error_handler}->($ret[1], $service);
}
Carp::croak "No available App::Nopaste::Service modules found";
}
1;
__END__
=pod
=head1 NAME
App::Nopaste - easy access to any pastebin
=head1 VERSION
version 0.96
=head1 SYNOPSIS
use App::Nopaste 'nopaste';
my $url = nopaste(q{
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/' [number]
});
# or on the command line:
nopaste test.pl
=> http://pastebin.com/fcba51f
=head1 DESCRIPTION
Pastebins (also known as nopaste sites) let you post text, usually code, for
public viewing. They're used a lot in IRC channels to show code that would
normally be too long to give directly in the channel (hence the name nopaste).
Each pastebin is slightly different. When one pastebin goes down (I'm looking
at you, L), then you have to find a new one. And if you
usually use a script to publish text, then it's too much hassle.
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.
It's also modular: you only need to put on CPAN a
L module and anyone can begin using it.
=head1 INTERFACE
=head2 CLI
See the documentation in L.
=head2 C
use App::Nopaste 'nopaste';
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't have to
services => ["Shadowcat", "Gist"],
);
print $url if $url;
The C function will return the URL of the paste on
success, or C on failure.
For each failure, the C argument is invoked with the error
message and the service that issued it.
For each warning, the C argument is invoked with the warning
message and the service that issued it.
=head1 SEE ALSO
L, L, L
L
=head1 AUTHOR
Shawn M Moore, C
=head1 COPYRIGHT AND LICENSE
Copyright 2008- Shawn M Moore.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
=cut
App-Nopaste-0.96/lib/App/Nopaste/Command.pm 000755 000767 000024 00000012247 12272072223 020676 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
package App::Nopaste::Command;
BEGIN {
$App::Nopaste::Command::AUTHORITY = 'cpan:SARTAK';
}
$App::Nopaste::Command::VERSION = '0.96';
use Getopt::Long::Descriptive ();
use App::Nopaste;
use Module::Runtime 'use_module';
sub new_with_options {
my $class = shift;
my ($opt, $usage) = Getopt::Long::Descriptive::describe_options(
"$0 %o",
['help|usage|?|h', 'Prints this usage information' ],
['desc|description|d=s',
'The one line description of your paste. The default is usually the first few characters of your text.'
],
['nick|nickname|name|n=s', 'Your nickname, usually displayed with the paste.'],
['lang|language|l=s', 'The language of the nopaste. Default: perl.',
{ default => 'perl' },
],
['chan|channel|c=s',
'The channel for the nopaste, not always relevant. Usually tied to a pastebot in that channel which will announce your paste.',
],
['services|service|s=s',
'The nopaste services to try, in order. You may also specify this in the env var NOPASTE_SERVICES.',
],
['list_services|list|L', 'List available nopaste services'],
['copy|x', 'If specified, automatically copy the URL to your clipboard.'],
['paste|p', 'If specified, use only the clipboard as input.'],
['open_url|open|o', 'If specified, automatically open the URL using Browser::Open.'],
['quiet|q', 'If specified, do not warn or complain about broken services.'],
['private', 'If specified, paste privately to services where possible.'],
);
print($usage->text), exit if $opt->help;
my $self = $class->new({
extra_argv => [@ARGV],
map { $_ => $opt->$_ } qw(
desc nick lang chan list_services copy paste open_url quiet private services
),
});
}
sub new {
my $class = shift;
my $self;
if (!ref $_[0]) {
$self = { @_ };
} else {
$self = $_[0]
}
$self->{services} = [ split /\s+/, $self->{services} ]
if defined $self->{services} && !ref $self->{services};
bless $self, $class;
return $self
}
my @acc = qw(
desc nick lang chan list_services copy paste open_url quiet private usage
extra_argv services
);
for my $a (@acc) {
no strict 'refs';
*{__PACKAGE__ . '::' . $a } = sub { $_[0]->{$a} }
}
sub filename {
my $self = shift;
my @files = @{ $self->extra_argv };
return undef unless @files;
return undef if $self->paste or $files[0] eq '-';
return $files[0];
}
sub run {
my $self = shift;
if ($self->list_services) {
for (sort App::Nopaste->plugins) {
s/App::Nopaste::Service::(\w+)$/$1/;
print $_, "\n";
}
exit 0;
}
my $text = $self->read_text;
utf8::decode($text);
my %args = map { $_ => $self->$_ } @acc, qw(filename);
$args{text} ||= $text;
$args{error_handler} = $args{warn_handler} = sub { }
if $self->quiet;
my $url = App::Nopaste->nopaste(%args);
if ($self->copy) {
use_module('Clipboard')->import;
Clipboard->copy($url);
}
if ($self->open_url) {
use_module('Browser::Open');
Browser::Open::open_browser($url);
}
return $url;
}
sub read_text {
my $self = shift;
if ($self->paste && @{ $self->extra_argv }) {
die "You may not specify --paste and files simultaneously.\n";
}
if ($self->paste) {
use_module('Clipboard')->import;
return Clipboard->paste;
}
local @ARGV = @{ $self->extra_argv };
local $/;
return <>;
}
1;
__END__
=pod
=head1 NAME
App::Nopaste::Command - command-line utility for L
=head1 VERSION
version 0.96
=head1 DESCRIPTION
This application will take some text on STDIN and give you a URL on STDOUT.
You may also specify files as arguments, they will be concatenated together
into one large nopaste.
=head1 OPTIONS
=head2 -d, --desc
The one line description of your paste. The default is usually the first few
characters of your text.
=head2 -n, --name
Your nickname, usually displayed with the paste. Default: C<$NOPASTE_NICK> then
C<$USER>.
=head2 -l, --lang
The language of the nopaste. The values accepted depend on the nopaste service.
There is no mapping done yet. Default: perl.
=head2 -c, --chan
The channel for the nopaste, not always relevant. Usually tied to a pastebot in that channel which will announce your paste.
=head2 -s, --services
The nopaste services to try, in order. You may also specify this in C<$NOPASTE_SERVICES> (space-separated list of service names, e.g. C).
=head2 -L, --list
List available nopaste services.
=head2 -x, --copy
If specified, automatically copy the URL to your clipboard, using the
L module.
=head2 -p, --paste
If specified, use only the clipboard as input, using the L module.
=head2 -o, --open
If specified, automatically open the URL using L. Browser::Open
tries a number of different browser commands depending on your OS.
=head2 --private
If specified, the paste access will be restricted to those that know the URL.
=head2 -q, --quiet
If specified, do not warn or complain about broken services.
=cut
App-Nopaste-0.96/lib/App/Nopaste/Service/ 000755 000767 000024 00000000000 12272072223 020351 5 ustar 00ether staff 000000 000000 App-Nopaste-0.96/lib/App/Nopaste/Service.pm 000755 000767 000024 00000007551 12272072223 020722 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
package App::Nopaste::Service;
BEGIN {
$App::Nopaste::Service::AUTHORITY = 'cpan:SARTAK';
}
$App::Nopaste::Service::VERSION = '0.96';
use WWW::Mechanize;
sub available { 1 }
sub forbid_in_default { 0 }
# this wrapper is so we can canonicalize arguments, especially "lang"
sub nopaste {
my $self = shift;
$self->run(@_);
}
sub run {
my $self = shift;
my $mech = WWW::Mechanize->new;
$self->get($mech => @_);
$self->fill_form($mech => @_);
return $self->return($mech => @_);
}
sub uri {
my $class = ref($_[0]) || $_[0];
Carp::croak "$class must provide a 'uri' method.";
}
sub get {
my $self = shift;
my $mech = shift;
my $res = $mech->get($self->uri);
die "Unable to fetch ".$self->uri.": " . $res->status_line
unless $res->is_success;
return $res;
}
sub fill_form {
my $self = shift;
my $mech = shift;
my %args = @_;
$mech->form_number(1);
$args{chan} = $self->canonicalize_chan($mech, $args{chan});
$mech->submit_form(
fields => {
paste => $args{text},
do { $args{chan} ? (channel => $args{chan}) : () },
do { $args{desc} ? (summary => $args{desc}) : () },
do { $args{nick} ? (nick => $args{nick}) : () },
private => (exists $args{private} && $args{private} ? 1 : 0),
},
);
}
sub canonicalize_chan {
my $self = shift;
my $mech = shift;
my $chan = shift;
return $chan if !$chan;
my @chans = grep { length }
$mech->current_form->find_input('channel')->possible_values;
my %is_valid = map { $_ => 1 } @chans;
return $chan if $is_valid{$chan};
my $orig = $chan;
$chan =~ s/^\#//;
return $chan if $is_valid{$chan};
$chan = "#$chan";
return $chan if $is_valid{$chan};
warn "Invalid channel '$orig'. Valid values are: " . join(', ', @chans);
return $orig;
}
sub return {
my $self = shift;
my $mech = shift;
my $link = $mech->find_link(url_regex => qr{/?(?:\d+)$});
return (0, "Could not find paste link.") if !$link;
return (1, $link->url);
}
1;
__END__
=pod
=head1 NAME
App::Nopaste::Service - base class for nopaste services
=head1 VERSION
version 0.96
=head1 SYNOPSIS
package App::Nopaste::Service::Shadowcat;
use base 'App::Nopaste::Service';
sub uri { "http://paste.scsys.co.uk/" }
=head1 DESCRIPTION
C defines a generic interface for uploading to nopaste
sites. It provides a default interface to that of the POE Pastebot.
=head1 METHODS
=head2 nopaste
This is the outermost method called by L and other clients. You
should not override this method, as it will (XXX: eventually) perform
canonicalization of arguments (such as C) for you.
=head2 run args -> (OK, message)
This is the outermost method you should override. You'll be passed a hash of arguments. The only arguments you should pay attention to are:
=over 4
=item text
The body of text to paste.
=item desc
A short (one-line) summary of the paste.
=item nick
The name of the person performing the paste.
=item chan
The IRC channel to which the paste belongs.
=item lang
The programming language of the body of text.
=item private
If false, the paste will be public (default).
=back
=head2 get mech, args
This should "get" the form to paste using the provided L
object. By default it does just that. See L below.
=head2 uri
If you only need to call C<< mech->get(uri) >> then you may define this method
to provide the URI of the nopaste service.
=head2 fill_form mech, args
This should have the L fill in the form using the arguments,
and submit it.
=head2 return mech, args
This should look at C<< WWW::Mechanize->content >> to find the URI to the
pasted text.
=head1 AUTHOR
Shawn M Moore, C<< >>
=cut
App-Nopaste-0.96/lib/App/Nopaste/Service/Codepeek.pm 000644 000767 000024 00000001772 12272072223 022435 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
package App::Nopaste::Service::Codepeek;
BEGIN {
$App::Nopaste::Service::Codepeek::AUTHORITY = 'cpan:SARTAK';
}
$App::Nopaste::Service::Codepeek::VERSION = '0.96';
use base 'App::Nopaste::Service';
sub uri { 'http://codepeek.com/paste' }
sub fill_form {
my $self = shift;
my $mech = shift;
my %args = @_;
$mech->form_number(1);
$mech->submit_form(
fields => {
'paste' => $args{text},
'language' => ucfirst $args{lang},
'privacy' => $args{private},
},
);
}
sub return {
my $self = shift;
my $mech = shift;
my $link = $mech->find_link( text_regex => qr#^http://codepeek.com/paste/[a-z0-9]+$#i );
my $url = $link->url;
return (0, "Could not construct paste link.") if !$url;
return (1, $url);
}
1;
__END__
=pod
=head1 NAME
App::Nopaste::Service::Codepeek - http://codepeek.com
=head1 VERSION
version 0.96
=head1 AUTHOR
Justin Hunter, C<< >>
=cut
App-Nopaste-0.96/lib/App/Nopaste/Service/Debian.pm 000644 000767 000024 00000016140 12272072223 022073 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
package App::Nopaste::Service::Debian;
BEGIN {
$App::Nopaste::Service::Debian::AUTHORITY = 'cpan:SARTAK';
}
$App::Nopaste::Service::Debian::VERSION = '0.96';
use base 'App::Nopaste::Service';
my $languages = {
"text" => "-1",
"abap" => "abap",
"ada" => "ada",
"ahk" => "ahk",
"antlr" => "antlr",
"antlr-as" => "antlr-as",
"antlr-cpp" => "antlr-cpp",
"antlr-csharp" => "antlr-csharp",
"antlr-java" => "antlr-java",
"antlr-objc" => "antlr-objc",
"antlr-perl" => "antlr-perl",
"antlr-python" => "antlr-python",
"antlr-ruby" => "antlr-ruby",
"apacheconf" => "apacheconf",
"applescript" => "applescript",
"as" => "as",
"as3" => "as3",
"aspx-cs" => "aspx-cs",
"aspx-vb" => "aspx-vb",
"asy" => "asy",
"awk" => "awk",
"basemake" => "basemake",
"bash" => "bash",
"bat" => "bat",
"bbcode" => "bbcode",
"befunge" => "befunge",
"blitzmax" => "blitzmax",
"boo" => "boo",
"brainfuck" => "brainfuck",
"bro" => "bro",
"c" => "c",
"cfengine3" => "cfengine3",
"cfm" => "cfm",
"cfs" => "cfs",
"cheetah" => "cheetah",
"clojure" => "clojure",
"cmake" => "cmake",
"c-objdump" => "c-objdump",
"coffee-script" => "coffee-script",
"common-lisp" => "common-lisp",
"console" => "console",
"control" => "control",
"coq" => "coq",
"cpp" => "cpp",
"cpp-objdump" => "cpp-objdump",
"csharp" => "csharp",
"css" => "css",
"css+django" => "css+django",
"css+erb" => "css+erb",
"css+genshitext" => "css+genshitext",
"css+mako" => "css+mako",
"css+myghty" => "css+myghty",
"css+php" => "css+php",
"css+smarty" => "css+smarty",
"Cucumber" => "Cucumber",
"cython" => "cython",
"d" => "d",
"dart" => "dart",
"delphi" => "delphi",
"diff" => "diff",
"django" => "django",
"d-objdump" => "d-objdump",
"dpatch" => "dpatch",
"dtd" => "dtd",
"duel" => "duel",
"dylan" => "dylan",
"ec" => "ec",
"ecl" => "ecl",
"elixir" => "elixir",
"erb" => "erb",
"erl" => "erl",
"erlang" => "erlang",
"evoque" => "evoque",
"factor" => "factor",
"fan" => "fan",
"fancy" => "fancy",
"felix" => "felix",
"fortran" => "fortran",
"fsharp" => "fsharp",
"gas" => "gas",
"genshi" => "genshi",
"genshitext" => "genshitext",
"glsl" => "glsl",
"gnuplot" => "gnuplot",
"go" => "go",
"gooddata-cl" => "gooddata-cl",
"gosu" => "gosu",
"groff" => "groff",
"groovy" => "groovy",
"gst" => "gst",
"haml" => "haml",
"haskell" => "haskell",
"html" => "html",
"html+cheetah" => "html+cheetah",
"html+django" => "html+django",
"html+evoque" => "html+evoque",
"html+genshi" => "html+genshi",
"html+mako" => "html+mako",
"html+myghty" => "html+myghty",
"html+php" => "html+php",
"html+smarty" => "html+smarty",
"html+velocity" => "html+velocity",
"http" => "http",
"hx" => "hx",
"hybris" => "hybris",
"iex" => "iex",
"ini" => "ini",
"io" => "io",
"ioke" => "ioke",
"irc" => "irc",
"jade" => "jade",
"java" => "java",
"js" => "js",
"js+cheetah" => "js+cheetah",
"js+django" => "js+django",
"js+erb" => "js+erb",
"js+genshitext" => "js+genshitext",
"js+mako" => "js+mako",
"js+myghty" => "js+myghty",
"json" => "json",
"jsp" => "jsp",
"js+php" => "js+php",
"js+smarty" => "js+smarty",
"kotlin" => "kotlin",
"lhs" => "lhs",
"lighty" => "lighty",
"llvm" => "llvm",
"logtalk" => "logtalk",
"lua" => "lua",
"make" => "make",
"mako" => "mako",
"maql" => "maql",
"mason" => "mason",
"matlab" => "matlab",
"matlabsession" => "matlabsession",
"minid" => "minid",
"modelica" => "modelica",
"modula2" => "modula2",
"moocode" => "moocode",
"moon" => "moon",
"mupad" => "mupad",
"mxml" => "mxml",
"myghty" => "myghty",
"mysql" => "mysql",
"nasm" => "nasm",
"nemerle" => "nemerle",
"newlisp" => "newlisp",
"newspeak" => "newspeak",
"nginx" => "nginx",
"nimrod" => "nimrod",
"numpy" => "numpy",
"objdump" => "objdump",
"objective-c" => "objective-c",
"objective-j" => "objective-j",
"ocaml" => "ocaml",
"octave" => "octave",
"ooc" => "ooc",
"opa" => "opa",
"openedge" => "openedge",
"perl" => "perl",
"php" => "php",
"plpgsql" => "plpgsql",
"postgresql" => "postgresql",
"postscript" => "postscript",
"pot" => "pot",
"pov" => "pov",
"powershell" => "powershell",
"prolog" => "prolog",
"properties" => "properties",
"protobuf" => "protobuf",
"psql" => "psql",
"py3tb" => "py3tb",
"pycon" => "pycon",
"pypylog" => "pypylog",
"pytb" => "pytb",
"python" => "python",
"python3" => "python3",
"ragel" => "ragel",
"ragel-c" => "ragel-c",
"ragel-cpp" => "ragel-cpp",
"ragel-d" => "ragel-d",
"ragel-em" => "ragel-em",
"ragel-java" => "ragel-java",
"ragel-objc" => "ragel-objc",
"ragel-ruby" => "ragel-ruby",
"raw" => "raw",
"rb" => "rb",
"rbcon" => "rbcon",
"rconsole" => "rconsole",
"rebol" => "rebol",
"redcode" => "redcode",
"rhtml" => "rhtml",
"rst" => "rst",
"sass" => "sass",
"scala" => "scala",
"scaml" => "scaml",
"scheme" => "scheme",
"scilab" => "scilab",
"scss" => "scss",
"smalltalk" => "smalltalk",
"smarty" => "smarty",
"sml" => "sml",
"snobol" => "snobol",
"sourceslist" => "sourceslist",
"splus" => "splus",
"sql" => "sql",
"sqlite3" => "sqlite3",
"squidconf" => "squidconf",
"ssp" => "ssp",
"sv" => "sv",
"tcl" => "tcl",
"tcsh" => "tcsh",
"tea" => "tea",
"tex" => "tex",
"text" => "text",
"trac-wiki" => "trac-wiki",
"urbiscript" => "urbiscript",
"v" => "v",
"vala" => "vala",
"vb.net" => "vb.net",
"velocity" => "velocity",
"vhdl" => "vhdl",
"vim" => "vim",
"xml" => "xml",
"xml+cheetah" => "xml+cheetah",
"xml+django" => "xml+django",
"xml+erb" => "xml+erb",
"xml+evoque" => "xml+evoque",
"xml+mako" => "xml+mako",
"xml+myghty" => "xml+myghty",
"xml+php" => "xml+php",
"xml+smarty" => "xml+smarty",
"xml+velocity" => "xml+velocity",
"xquery" => "xquery",
"xslt" => "xslt",
"yaml" => "yaml",
};
sub uri { "http://paste.debian.net/" }
sub fill_form {
my $self = shift;
my $mech = shift;
my %args = @_;
my $lang = $languages->{$args{lang}} if $args{lang};
$mech->form_number(1);
if ($args{private}) {
$mech->tick('private', '1');
}
$mech->submit_form(
fields => {
code => $args{text},
do { $args{nick} ? (poster => $args{nick}) : () },
do { $lang ? (lang => $lang) : () },
},
);
}
sub return {
my $self = shift;
my $mech = shift;
my $link = $mech->uri();
return (1, $link);
}
1;
__END__
=pod
=head1 NAME
App::Nopaste::Service::Debian - http://paste.debian.net/
=head1 VERSION
version 0.96
=head1 AUTHOR
Ryan Niebur, C<< >>
=cut
App-Nopaste-0.96/lib/App/Nopaste/Service/Gist.pm 000755 000767 000024 00000010747 12272072223 021631 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
package App::Nopaste::Service::Gist;
BEGIN {
$App::Nopaste::Service::Gist::AUTHORITY = 'cpan:SARTAK';
}
$App::Nopaste::Service::Gist::VERSION = '0.96';
use base 'App::Nopaste::Service';
use File::Basename ();
use JSON ();
use Module::Runtime 'use_module';
sub available { 1 }
sub forbid_in_default { 0 }
sub nopaste {
my $self = shift;
$self->run(@_);
}
sub run {
my ($self, %arg) = @_;
my $ua = LWP::UserAgent->new;
my $content = {
public => defined $arg{private} ? 0 : 1,
defined $arg{desc} ? (description => $arg{desc}) : (),
};
my $filename = defined $arg{filename}
? File::Basename::basename($arg{filename})
: 'nopaste';
$content->{files} = {
$filename => {
content => $arg{text}
}
};
$content = JSON::encode_json($content);
my %auth = $self->_get_auth;
my $url = 'https://api.github.com/gists';
my $res = do {
if ($auth{oauth_token}) {
$ua->post(
$url,
'Authorization' => "token $auth{oauth_token}",
Content => $content
);
}
else {
use_module('HTTP::Request::Common');
my $req = HTTP::Request::Common::POST($url, Content => $content);
$req->authorization_basic(@auth{qw/username password/});
$ua->request($req);
}
};
return $self->return($res);
}
sub _get_auth {
my ($self) = @_;
if (my $oauth_token = $ENV{GITHUB_OAUTH_TOKEN}) {
return (oauth_token => $oauth_token);
}
elsif ($ENV{GITHUB_USER} && $ENV{GITHUB_PASSWORD}) {
return (
username => $ENV{GITHUB_USER},
password => $ENV{GITHUB_PASSWORD},
);
}
die join("\n",
"Export GITHUB_OAUTH_TOKEN first. For example:",
" perl -Ilib -MApp::Nopaste::Service::Gist -e 'App::Nopaste::Service::Gist->create_token'",
"",
"OR you can export GITHUB_USER and GITHUB_PASSWORD.",
) . "\n";
}
sub create_token {
my ($self) = @_;
local $| = 1;
print "Username: ";
chomp(my $username = <>);
print "Password: ";
chomp(my $password = <>);
print "\n\n";
exit unless $username && $password;
my $parameters = {
scopes => ["gist"],
note => "App::Nopaste",
note_url => "https://metacpan.org/module/App::Nopaste",
};
my $ua = LWP::UserAgent->new;
my $request = HTTP::Request->new(POST => 'https://api.github.com/authorizations');
$request->authorization_basic($username, $password);
$request->content(JSON::encode_json($parameters));
my $response = $ua->request($request);
my $response_content = JSON::decode_json($response->decoded_content);
if ($response_content->{token} ) {
print "GITHUB_OAUTH_TOKEN=$response_content->{token}\n";
}
else {
print $response_content->{message} || "Unspecified error", "\n";
}
}
sub return {
my ($self, $res) = @_;
if ($res->is_error) {
my $text = $res->status_line;
if ($res->code == 401) {
$text .= "\nYou may need to authorize $0. See `perldoc " . __PACKAGE__ . "`";
}
return (0, "Failed: " . $text);
}
if (($res->header('Client-Warning') || '') eq 'Internal response') {
return (0, "LWP Error: " . $res->content);
}
my $id = JSON::decode_json($res->content)->{id};
return (0, "Could not find paste link.") if !$id;
return (1, "http://gist.github.com/$id");
}
1;
__END__
=pod
=head1 NAME
App::Nopaste::Service::Gist - http://gist.github.com/
=head1 VERSION
version 0.96
=head1 GitHub Authorization
In order to create gists you have to get an oauth token. That could be easily
obtained via curl:
curl -X POST 'https://USERNAME:PASSWORD@api.github.com/authorizations' \
-d '{"scopes":["gist"],"note":"App::Nopaste"}'
or you can use this module to do the same:
perl -MApp::Nopaste::Service::Gist -e 'App::Nopaste::Service::Gist->create_token'
This will grant gist rights to the L, don't worry you can revoke
access rights anytime from the GitHub profile settings. Search for C in
response and export it as C environment variable.
Alternatively, you can export the C and C
environment variables, just like for the
L utility.
That's it!
=head1 AUTHOR
Ricardo SIGNES, C<< >>
=cut
App-Nopaste-0.96/lib/App/Nopaste/Service/PastebinCom.pm 000755 000767 000024 00000001730 12272072223 023117 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
package App::Nopaste::Service::PastebinCom;
BEGIN {
$App::Nopaste::Service::PastebinCom::AUTHORITY = 'cpan:SARTAK';
}
$App::Nopaste::Service::PastebinCom::VERSION = '0.96';
use base 'App::Nopaste::Service';
use Module::Runtime 'use_module';
sub available {
eval { use_module('WWW::Pastebin::PastebinCom::Create'); 1 }
}
sub run {
my $self = shift;
my %args = @_;
use_module('WWW::Pastebin::PastebinCom::Create');
$args{poster} = delete $args{nick} if defined $args{nick};
$args{format} = delete $args{lang} if defined $args{lang};
my $paster = WWW::Pastebin::PastebinCom::Create->new;
my $ok = $paster->paste(
expiry => 'm',
%args,
);
return (0, $paster->error) unless $ok;
return (1, $paster->paste_uri);
}
1;
__END__
=pod
=head1 NAME
App::Nopaste::Service::PastebinCom - http://pastebin.com/
=head1 VERSION
version 0.96
=head1 SEE ALSO
L
=cut
App-Nopaste-0.96/lib/App/Nopaste/Service/Pastie.pm 000644 000767 000024 00000004437 12272072223 022144 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
package App::Nopaste::Service::Pastie;
BEGIN {
$App::Nopaste::Service::Pastie::AUTHORITY = 'cpan:SARTAK';
}
$App::Nopaste::Service::Pastie::VERSION = '0.96';
use base 'App::Nopaste::Service';
my %languages = (
"bash" => "13",
"c#" => "20",
"c/c++" => "7",
"css" => "8",
"diff" => "5",
"go" => "21",
"html (erb / rails)" => "12",
"html / xml" => "11",
"java" => "9",
"javascript" => "10",
"objective-c/c++" => "1",
"perl" => "18",
"php" => "15",
"plain text" => "6",
"python" => "16",
"ruby" => "3",
"ruby on rails" => "4",
"sql" => "14",
# hidden
"apache" => "22",
"clojure" => "38",
"d" => "26",
"erlang" => "27",
"fortran" => "28",
"haskell" => "29",
"ini" => "35",
"io" => "24",
"lisp" => "25",
"lua" => "23",
"makefile" => "31",
"nu" => "36",
"pascal" => "17",
"puppet" => "39",
"scala" => "32",
"scheme" => "33",
"smarty" => "34",
"tex" => "37",
# aliases
"sh" => "13",
"c" => "7",
"c++" => "7",
"objective-C" => "1",
"objective-C++" => "1",
"plain" => "6",
"raw" => "6",
"rails" => "4",
"html" => "11",
"xml" => "11",
"js" => "10",
"make" => "31",
);
sub uri { 'http://pastie.org/' }
sub fill_form {
my $self = shift;
my $mech = shift;
my %args = @_;
my $lang_id = $languages{"plain text"};
$lang_id = $languages{lc($args{lang})}
if (exists $args{lang} && exists $languages{lc($args{lang})});
$mech->submit_form(
fields => {
"paste[body]" => $args{text},
"paste[authorization]" => 'burger', # set with JS to avoid bots
"paste[restricted]" => $args{private},
"paste[parser_id]" => $lang_id,
},
);
}
sub return {
my $self = shift;
my $mech = shift;
my $prefix ='';
my ($id) = $mech->title =~ /\#(\d+)/;
if (!$id) {
($id) = $mech->content =~ m{http://pastie.org/\d+/wrap\?key=([a-z0-9]+)};
$prefix = 'private/';
}
return (0, "Could not construct paste link.") if !$id;
return (1, "http://pastie.org/$prefix$id");
}
1;
__END__
=pod
=head1 NAME
App::Nopaste::Service::Pastie - http://pastie.org
=head1 VERSION
version 0.96
=cut
App-Nopaste-0.96/lib/App/Nopaste/Service/Shadowcat.pm 000755 000767 000024 00000001002 12272072223 022620 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
package App::Nopaste::Service::Shadowcat;
BEGIN {
$App::Nopaste::Service::Shadowcat::AUTHORITY = 'cpan:SARTAK';
}
$App::Nopaste::Service::Shadowcat::VERSION = '0.96';
use base 'App::Nopaste::Service';
sub available {
my $self = shift;
my %args = @_;
return !(exists($args{private}) && $args{private});
}
sub uri { "http://paste.scsys.co.uk" }
1;
__END__
=pod
=head1 NAME
App::Nopaste::Service::Shadowcat - http://paste.scsys.co.uk/
=head1 VERSION
version 0.96
=cut
App-Nopaste-0.96/lib/App/Nopaste/Service/Snitch.pm 000755 000767 000024 00000000762 12272072223 022147 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
package App::Nopaste::Service::Snitch;
BEGIN {
$App::Nopaste::Service::Snitch::AUTHORITY = 'cpan:SARTAK';
}
$App::Nopaste::Service::Snitch::VERSION = '0.96';
use base 'App::Nopaste::Service';
sub available {
my $self = shift;
my %args = @_;
return !(exists($args{private}) && $args{private});
}
sub uri { "http://nopaste.snit.ch" }
1;
__END__
=pod
=head1 NAME
App::Nopaste::Service::Snitch - http://nopaste.snit.ch/
=head1 VERSION
version 0.96
=cut
App-Nopaste-0.96/lib/App/Nopaste/Service/ssh.pm 000755 000767 000024 00000006411 12272072223 021511 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
package App::Nopaste::Service::ssh;
BEGIN {
$App::Nopaste::Service::ssh::AUTHORITY = 'cpan:SARTAK';
}
$App::Nopaste::Service::ssh::VERSION = '0.96';
use base 'App::Nopaste::Service';
use File::Temp;
use File::Spec;
use POSIX qw(strftime);
use URI::Escape qw(uri_escape);
sub run {
my ($self, %args) = @_;
my $source = $args{'filename'};
my $server = $ENV{NOPASTE_SSH_SERVER} || return (0,"No NOPASTE_SSH_SERVER set");
my $docroot = $ENV{NOPASTE_SSH_DOCROOT} || return (0, "No NOPASTE_SSH_DOCROOT set");
my $topurl = $ENV{NOPASTE_SSH_WEBPATH} || "http://$server";
my $mode = $ENV{NOPASTE_SSH_MODE} || undef;
my $usedesc = defined $ENV{NOPASTE_SSH_USE_DESCRIPTION}
? $ENV{NOPASTE_SSH_USE_DESCRIPTION}
: 1;
my $date = strftime("%Y-%m-%d",localtime());
my ($ext) = defined $source && $source =~ s/(\.[^.\/\\]+?)$// ? $1 : '';
my $suffix = $ext;
if ($usedesc) {
if (not $args{'desc'}) {
my ($vol, $dirs, $file) = File::Spec->splitpath($source);
$args{'desc'} = $file || '';
}
$args{'desc'} =~ s/\s+/+/g; # more readable than %20
$suffix = ($args{'desc'} ? '-' : '') . $args{'desc'} . $suffix;
}
my $tmp = File::Temp->new(
TEMPLATE => "${date}XXXXXXXX",
SUFFIX => $suffix,
UNLINK => 1,
TMPDIR => 1,
);
my $filename = File::Spec->rel2abs($tmp->filename);
print $tmp $args{text}
or return (0, "Can't write to tempfile $filename");
close $tmp
or return (0, "Can't write to tempfile $filename");
chmod oct($mode), $filename
if defined $mode;
system('scp', '-pq', $filename, "$server:$docroot");
my ($volume, $dir, $file) = File::Spec->splitpath($filename);
$file = uri_escape($file);
$file =~ s/%2b/+/gi;
return (1, "$topurl/$file");
}
1;
__END__
=pod
=head1 NAME
App::Nopaste::Service::ssh - copies files to your server using scp
=head1 VERSION
version 0.96
=head1 AUTHOR
Kevin Falcone C<< >>
Thomas Sibley C<< >>
=head1 ENVIRONMENT VARIABLES
=over 4
=item NOPASTE_SSH_SERVER
The hostname to which you ssh. The left-hand side of the colon in the scp.
For example: C.
=item NOPASTE_SSH_DOCROOT
The path on disk for your pastes. For example: C.
=item NOPASTE_SSH_WEBPATH
The path for URLs. For example: C.
=item NOPASTE_SSH_MODE
Octal permissions mode to set for the temporary file before uploading.
For example: C<0644>.
=item NOPASTE_SSH_USE_DESCRIPTION
Use the supplied description in the paste filename for easier identification of
pastes. Defaults to the source filename, if any, but is overridden by an
explicit C<-d> or C<--description> command line argument.
=back
=head1 APACHE CONFIGURATION RECOMMENDATIONS
The following is a recommended Apache configuration you can drop into
C<.htaccess> in your paste dir.
RemoveHandler .cgi
RemoveHandler .pl
AddDefaultCharset utf-8
Options -ExecCGI -FollowSymLinks -Includes -MultiViews
It prevents common means of script execution so that C<.pl> and C<.cgi>
files won't run and defaults the character set to UTF-8 so browsers
don't have to guess wrong.
=cut
App-Nopaste-0.96/lib/App/Nopaste/Service/Ubuntu.pm 000644 000767 000024 00000025364 12272072223 022203 0 ustar 00ether staff 000000 000000 use strict;
use warnings;
package App::Nopaste::Service::Ubuntu;
BEGIN {
$App::Nopaste::Service::Ubuntu::AUTHORITY = 'cpan:SARTAK';
}
$App::Nopaste::Service::Ubuntu::VERSION = '0.96';
use base 'App::Nopaste::Service';
my $languages = {
"Plain Text" => "text",
"Gherkin" => "Cucumber",
"ABAP" => "abap",
"Ada" => "ada",
"autohotkey" => "ahk",
"ANTLR" => "antlr",
"ANTLR With ActionScript Target" => "antlr-as",
"ANTLR With CPP Target" => "antlr-cpp",
"ANTLR With C# Target" => "antlr-csharp",
"ANTLR With Java Target" => "antlr-java",
"ANTLR With ObjectiveC Target" => "antlr-objc",
"ANTLR With Perl Target" => "antlr-perl",
"ANTLR With Python Target" => "antlr-python",
"ANTLR With Ruby Target" => "antlr-ruby",
"ApacheConf" => "apacheconf",
"AppleScript" => "applescript",
"ActionScript" => "as",
"ActionScript 3" => "as3",
"aspx-cs" => "aspx-cs",
"aspx-vb" => "aspx-vb",
"Asymptote" => "asy",
"Makefile" => "basemake",
"Bash" => "bash",
"Batchfile" => "bat",
"BBCode" => "bbcode",
"Befunge" => "befunge",
"BlitzMax" => "blitzmax",
"Boo" => "boo",
"C" => "c",
"c-objdump" => "c-objdump",
"Coldfusion HTML" => "cfm",
"cfstatement" => "cfs",
"Cheetah" => "cheetah",
"Clojure" => "clojure",
"CMake" => "cmake",
"CoffeeScript" => "coffee-script",
"Common Lisp" => "common-lisp",
"Bash Session" => "console",
"Debian Control file" => "control",
"C++" => "cpp",
"cpp-objdump" => "cpp-objdump",
"C#" => "csharp",
"CSS" => "css",
"CSS+Django/Jinja" => "css+django",
"CSS+Ruby" => "css+erb",
"CSS+Genshi Text" => "css+genshitext",
"CSS+Mako" => "css+mako",
"CSS+Myghty" => "css+myghty",
"CSS+PHP" => "css+php",
"CSS+Smarty" => "css+smarty",
"Cython" => "cython",
"D" => "d",
"d-objdump" => "d-objdump",
"Delphi" => "delphi",
"Diff" => "diff",
"Django/Jinja" => "django",
"Darcs Patch" => "dpatch",
"Duel" => "duel",
"Dylan" => "dylan",
"ERB" => "erb",
"Erlang erl session" => "erl",
"Erlang" => "erlang",
"Evoque" => "evoque",
"Factor" => "factor",
"Felix" => "felix",
"Fortran" => "fortran",
"GAS" => "gas",
"Genshi" => "genshi",
"Genshi Text" => "genshitext",
"GLSL" => "glsl",
"Gnuplot" => "gnuplot",
"Go" => "go",
"GoodData-CL" => "gooddata-cl",
"Groff" => "groff",
"Haml" => "haml",
"Haskell" => "haskell",
"HTML" => "html",
"HTML+Cheetah" => "html+cheetah",
"HTML+Django/Jinja" => "html+django",
"HTML+Evoque" => "html+evoque",
"HTML+Genshi" => "html+genshi",
"HTML+Mako" => "html+mako",
"HTML+Myghty" => "html+myghty",
"HTML+PHP" => "html+php",
"HTML+Smarty" => "html+smarty",
"HTML+Velocity" => "html+velocity",
"haXe" => "hx",
"Hybris" => "hybris",
"INI" => "ini",
"Io" => "io",
"Ioke" => "ioke",
"IRC logs" => "irc",
"Jade" => "jade",
"Java" => "java",
"JavaScript" => "js",
"JavaScript+Cheetah" => "js+cheetah",
"JavaScript+Django/Jinja" => "js+django",
"JavaScript+Ruby" => "js+erb",
"JavaScript+Genshi Text" => "js+genshitext",
"JavaScript+Mako" => "js+mako",
"JavaScript+Myghty" => "js+myghty",
"JavaScript+PHP" => "js+php",
"JavaScript+Smarty" => "js+smarty",
"Java Server Page" => "jsp",
"Literate Haskell" => "lhs",
"Lighttpd configuration file" => "lighty",
"LLVM" => "llvm",
"Logtalk" => "logtalk",
"Lua" => "lua",
"Makefile" => "make",
"Mako" => "mako",
"MAQL" => "maql",
"Mason" => "mason",
"Matlab" => "matlab",
"Matlab session" => "matlabsession",
"MiniD" => "minid",
"Modelica" => "modelica",
"Modula-2" => "modula2",
"MOOCode" => "moocode",
"MuPAD" => "mupad",
"MXML" => "mxml",
"Myghty" => "myghty",
"MySQL" => "mysql",
"NASM" => "nasm",
"Newspeak" => "newspeak",
"Nginx configuration file" => "nginx",
"NumPy" => "numpy",
"objdump" => "objdump",
"Objective-C" => "objective-c",
"Objective-J" => "objective-j",
"OCaml" => "ocaml",
"Ooc" => "ooc",
"Perl" => "perl",
"PHP" => "php",
"PostScript" => "postscript",
"Gettext Catalog" => "pot",
"POVRay" => "pov",
"Prolog" => "prolog",
"Properties" => "properties",
"Protocol Buffer" => "protobuf",
"Python 3.0 Traceback" => "py3tb",
"Python console session" => "pycon",
"Python Traceback" => "pytb",
"Python" => "python",
"Python 3" => "python3",
"Ragel" => "ragel",
"Ragel in C Host" => "ragel-c",
"Ragel in CPP Host" => "ragel-cpp",
"Ragel in D Host" => "ragel-d",
"Embedded Ragel" => "ragel-em",
"Ragel in Java Host" => "ragel-java",
"Ragel in Objective C Host" => "ragel-objc",
"Ragel in Ruby Host" => "ragel-ruby",
"Raw token data" => "raw",
"Ruby" => "rb",
"Ruby irb session" => "rbcon",
"RConsole" => "rconsole",
"REBOL" => "rebol",
"Redcode" => "redcode",
"RHTML" => "rhtml",
"reStructuredText" => "rst",
"Sass" => "sass",
"Scala" => "scala",
"Scaml" => "scaml",
"Scheme" => "scheme",
"SCSS" => "scss",
"Smalltalk" => "smalltalk",
"Smarty" => "smarty",
"Debian Sourcelist" => "sourceslist",
"S" => "splus",
"SQL" => "sql",
"sqlite3con" => "sqlite3",
"SquidConf" => "squidconf",
"Scalate Server Page" => "ssp",
"Tcl" => "tcl",
"Tcsh" => "tcsh",
"TeX" => "tex",
"Text only" => "text",
"MoinMoin/Trac Wiki markup" => "trac-wiki",
"verilog" => "v",
"Vala" => "vala",
"VB.net" => "vb.net",
"Velocity" => "velocity",
"VimL" => "vim",
"XML" => "xml",
"XML+Cheetah" => "xml+cheetah",
"XML+Django/Jinja" => "xml+django",
"XML+Ruby" => "xml+erb",
"XML+Evoque" => "xml+evoque",
"XML+Mako" => "xml+mako",
"XML+Myghty" => "xml+myghty",
"XML+PHP" => "xml+php",
"XML+Smarty" => "xml+smarty",
"XML+Velocity" => "xml+velocity",
"XQuery" => "xquery",
"XSLT" => "xslt",
"YAML" => "yaml",
};
sub uri { "http://paste.ubuntu.com/" }
sub fill_form {
my $self = shift;
my $mech = shift;
my %args = @_;
my $lang = $languages->{$args{lang}} if $args{lang};
$mech->form_number(1);
$mech->submit_form(
fields => {
content => $args{text},
do { $args{nick} ? (poster => $args{nick}) : () },
do { $lang ? (syntax => $lang) : () },
},
);
}
sub return {
my $self = shift;
my $mech = shift;
my $link = $mech->uri();
return (1, $link);
}
1;
__END__
=pod
=head1 NAME
App::Nopaste::Service::Ubuntu - http://paste.ubuntu.com/
=head1 VERSION
version 0.96
=head1 AUTHOR
gregor herrmann, C<< >>
(Based on App::Nopaste::Service::Debian, written by
Ryan Niebur, C<< >>)
=cut