Mojolicious-Command-nopaste

 view release on metacpan or  search on metacpan

lib/Mojolicious/Command/nopaste.pm  view on Meta::CPAN

1;

=head1 NAME

Mojolicious::Command::nopaste - A clone of App::Nopaste using Mojolicious

=head1 SYNOPSIS

 $ mojo nopaste pastie myfile.pl
 $ cat myfile.pl | mojo nopaste shadowcat
 $ mojo nopaste -p  # contents pulled from clipboard

=head1 DESCRIPTION

This module is a clone of the venerable L<App::Nopaste> using the L<Mojolicious> toolkit.
Nearly all of the functionality is mimicked.
Where possible the command-line system has been replicated, though the mechanism of
choosing the service differs due to the way the L<Mojolicious::Commands> system works.

Files may be passed as arguments, read from STDIN or even read from the clipboard with the
L<Clipboard> module.
For a list of available services run C<mojo help nopaste> or C<mojo nopaste help [SERVICE]>.

=head1 SEE ALSO

=over

=item L<App::Nopaste>

=item L<Mojolicious>

lib/Mojolicious/Command/nopaste/Service.pm  view on Meta::CPAN

our $USAGE = <<END;
USAGE:

  $0 command SERVICE [OPTIONS] [FILES]

OPTIONS:
  Note that not all options are relevant for all services.

  --channel, -c       The channel for the service's pastebot or to post via Mojo::IRC
                          e.g. perl, #perl, irc://irc.perl.org:6667/perl
  --copy, -x          Copy the resulting URL to the clipboard (requires Clipboard.pm)
  --description, -d   Description or title of the nopaste
  --name, -n          Your name or nick, used for the pastebin and/or IRC
  --language, -l      Language for syntax highlighting, defaults to 'perl'
  --open, -o          Open a browser to the url (requires Browser::Open)
  --paste, -p         Read contents from clipboard (requires Clipboard.pm)
  --private, -P       Mark the paste as private (note: silently ignored if not relevant for service)
  --token, -t         A file containing an access token, or else the token string itself
  --update, -u        Update a paste of a given id

END

has usage => sub {
  my $self = shift;
  my $usage = $USAGE;
  if (my $add = $self->service_usage) {



( run in 0.594 second using v1.01-cache-2.11-cpan-84e82930d8c )