| 1 | package Mojolicious::Command::nopaste; | ||
| 2 | 1 | ▶ | use Mojo::Base 'Mojolicious::Commands'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 1 | ▶ | use Mojolicious::Command::nopaste::Service; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 1 | our $VERSION = '0.12'; | |
| 6 | 1 | $VERSION = eval $VERSION; | |
| 7 | |||
| 8 | 1 | has description => "Paste to your favorite pastebin sites.\n"; | |
| 9 | |||
| 10 | 0 | ▶ | has message => sub { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 11 | 0 | return shift->description . <<EOF; | |
| 12 | |||
| 13 | These services are currently available: | ||
| 14 | EOF | ||
| 15 | 1 | }; | |
| 16 | |||
| 17 | 1 | has hint => "\n" . $Mojolicious::Command::nopaste::Service::USAGE . <<EOF; | |
| 18 | |||
| 19 | See '$0 nopaste help SERVICE' for more information on a specific service implementation. | ||
| 20 | EOF | ||
| 21 | |||
| 22 | 0 | ▶ | has namespaces => sub { ['Mojolicious::Command::nopaste::Service'] }; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 23 | |||
| 24 | 0 | ▶ | sub help { shift->run(@_) } |
|
Subroutine
help: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 25 | |||
| 26 | 1 | 1; | |
| 27 | |||
| 28 | =head1 NAME | ||
| 29 | |||
| 30 | Mojolicious::Command::nopaste - A clone of App::Nopaste using Mojolicious | ||
| 31 | |||
| 32 | =head1 SYNOPSIS | ||
| 33 | |||
| 34 | $ mojo nopaste pastie myfile.pl | ||
| 35 | $ cat myfile.pl | mojo nopaste shadowcat | ||
| 36 | $ mojo nopaste -p # contents pulled from clipboard | ||
| 37 | |||
| 38 | =head1 DESCRIPTION | ||
| 39 | |||
| 40 | This module is a clone of the venerable L<App::Nopaste> using the L<Mojolicious> toolkit. | ||
| 41 | Nearly all of the functionality is mimicked. | ||
| 42 | Where possible the command-line system has been replicated, though the mechanism of | ||
| 43 | choosing the service differs due to the way the L<Mojolicious::Commands> system works. | ||
| 44 | |||
| 45 | Files may be passed as arguments, read from STDIN or even read from the clipboard with the | ||
| 46 | L<Clipboard> module. | ||
| 47 | For a list of available services run C<mojo help nopaste> or C<mojo nopaste help [SERVICE]>. | ||
| 48 | |||
| 49 | =head1 SEE ALSO | ||
| 50 | |||
| 51 | =over | ||
| 52 | |||
| 53 | =item L<App::Nopaste> | ||
| 54 | |||
| 55 | =item L<Mojolicious> | ||
| 56 | |||
| 57 | =back | ||
| 58 | |||
| 59 | =head1 SOURCE REPOSITORY | ||
| 60 | |||
| 61 | L<http://github.com/jberger/Mojolicious-Command-nopaste> | ||
| 62 | |||
| 63 | =head1 AUTHOR | ||
| 64 | |||
| 65 | Joel Berger, E<lt>joel.a.berger@gmail.comE<gt> | ||
| 66 | |||
| 67 | =head1 COPYRIGHT AND LICENSE | ||
| 68 | |||
| 69 | Copyright (C) 2013 by Joel Berger | ||
| 70 | |||
| 71 | This library is free software; you can redistribute it and/or modify | ||
| 72 | it under the same terms as Perl itself. | ||