App-DuckPAN
view release on metacpan or search on metacpan
bin/duckpan view on Meta::CPAN
#!/usr/bin/env perl
# PODNAME: duckpan
# ABSTRACT: Command line tool for using the DuckPAN of DuckDuckGo
use strict; use warnings;
my @libs;
BEGIN {
use Getopt::Long qw/:config bundling pass_through/;
use Path::Tiny;
use Try::Tiny;
GetOptions 'include|I=s' => \@libs;
@libs = split ',', join ',', @libs;
if (my @missing = grep { !$_->exists } map { path($_) } @libs) {
my $plural = (scalar @missing == 1) ? '' : 's';
print STDERR '[FATAL ERROR] Missing include path' . $plural . ': ' . join(', ',
map { try { $_->realpath } || $_->absolute } @missing) . "\n";
exit 1;
}
# For other commands, bundling is desirable but pass_through leads to
# incomplete validation of command line arguments
Getopt::Long::Configure('no_pass_through');
}
use lib @libs;
$|=1;
use App::DuckPAN;
App::DuckPAN->new_with_cmd;
__END__
=pod
=head1 NAME
duckpan - Command line tool for using the DuckPAN of DuckDuckGo
=head1 VERSION
version 1021
=head1 SYNOPSIS
duckpan [-I=<path>] [-v|--verbose] <command> [<args>]
Commands include:
check Check if you fulfill all requirements for the development environment
env Add, remove or retrieve values from DuckPAN's Env.ini
help View more detailed help information
installdeps Install all Perl dependencies
new Generate new Instant Answer skeleton
publisher Start local web server for DuckDuckGo-Publisher static websites
query Test Instant Answer triggers on command line
reinstall Reinstalls installed, pinned, or most recent DuckPAN and DDG Perl modules
latest Like reintall but ignores installed versions
roadrunner Same as installdeps, but skips tests (dangerous!)
server Start local web server to test Instant Answer display
update Installs newest DuckPAN packages
upgrade Installs newest DuckPAN and DDG packages
Use 'duckpan help' or 'man duckpan' for more details.
=head1 DESCRIPTION
DuckPAN is an application built to aid DuckDuckHack contributors with Instant Answer development. It is mainly used by contributors to test Instant Answer triggers and preview their visual design and output.
=head1 NAME
( run in 0.666 second using v1.01-cache-2.11-cpan-5a3173703d6 )