App-DuckPAN
view release on metacpan or search on metacpan
"Plack::Request" : "0",
"Plack::Response" : "0",
"Plack::Runner" : "0",
"Pod::Usage" : "0",
"Term::ANSIColor" : "0",
"Term::ProgressBar" : "0",
"Term::ReadLine" : "0",
"Term::UI" : "0",
"Text::Xslate" : "0",
"Time::HiRes" : "0",
"Try::Tiny" : "0",
"URI::Escape" : "0",
"YAML::XS" : "0",
"feature" : "0",
"lib" : "0",
"namespace::clean" : "0",
"open" : "0",
"strict" : "0",
"version" : "0",
"warnings" : "0"
}
Plack::Request: '0'
Plack::Response: '0'
Plack::Runner: '0'
Pod::Usage: '0'
Term::ANSIColor: '0'
Term::ProgressBar: '0'
Term::ReadLine: '0'
Term::UI: '0'
Text::Xslate: '0'
Time::HiRes: '0'
Try::Tiny: '0'
URI::Escape: '0'
YAML::XS: '0'
feature: '0'
lib: '0'
namespace::clean: '0'
open: '0'
strict: '0'
version: '0'
warnings: '0'
resources:
Makefile.PL view on Meta::CPAN
"Plack::Request" => 0,
"Plack::Response" => 0,
"Plack::Runner" => 0,
"Pod::Usage" => 0,
"Term::ANSIColor" => 0,
"Term::ProgressBar" => 0,
"Term::ReadLine" => 0,
"Term::UI" => 0,
"Text::Xslate" => 0,
"Time::HiRes" => 0,
"Try::Tiny" => 0,
"URI::Escape" => 0,
"YAML::XS" => 0,
"feature" => 0,
"lib" => 0,
"namespace::clean" => 0,
"open" => 0,
"strict" => 0,
"version" => 0,
"warnings" => 0
},
Makefile.PL view on Meta::CPAN
"Term::ANSIColor" => 0,
"Term::ProgressBar" => 0,
"Term::ReadLine" => 0,
"Term::UI" => 0,
"Test::Exception" => 0,
"Test::LoadAllModules" => 0,
"Test::More" => 0,
"Test::Script::Run" => 0,
"Text::Xslate" => 0,
"Time::HiRes" => 0,
"Try::Tiny" => 0,
"URI::Escape" => 0,
"YAML::XS" => 0,
"feature" => 0,
"lib" => 0,
"namespace::clean" => 0,
"open" => 0,
"strict" => 0,
"version" => 0,
"warnings" => 0
);
bin/duckpan view on Meta::CPAN
# 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
lib/App/DuckPAN/Cmd/New.pm view on Meta::CPAN
our $AUTHORITY = 'cpan:DDG';
# ABSTRACT: Take a name as input and generates a new, named Goodie or Spice instant answer skeleton
$App::DuckPAN::Cmd::New::VERSION = '1021';
# See the template/templates.yml file in the Goodie or Spice repository for the
# list of template-sets and files generated for them
use Moo;
with qw( App::DuckPAN::Cmd );
use MooX::Options protect_argv => 0;
use Try::Tiny;
use List::MoreUtils 'any';
use App::DuckPAN::TemplateDefinitions;
no warnings 'uninitialized';
##########################
# Command line arguments #
##########################
# A 'template' for the user is equivalent to a 'template-set' for the program
lib/App/DuckPAN/Query.pm view on Meta::CPAN
package App::DuckPAN::Query;
our $AUTHORITY = 'cpan:DDG';
# ABSTRACT: Main application/loop for duckpan query
$App::DuckPAN::Query::VERSION = '1021';
use Moo;
use Data::Printer return_value => 'dump';
use POE qw( Wheel::ReadLine );
use Try::Tiny;
use Path::Tiny;
use App::DuckPAN::Fathead;
use open qw/:std :utf8/;
# Entry into the module.
sub run {
my ( $self, $app, $blocks ) = @_;
# Here so that travis builds will pass on github
require DDG::Request;
lib/App/DuckPAN/Restart.pm view on Meta::CPAN
package App::DuckPAN::Restart;
our $AUTHORITY = 'cpan:DDG';
# ABSTRACT: Automatic restarting of application on file change
$App::DuckPAN::Restart::VERSION = '1021';
use File::Find::Rule;
use Filesys::Notify::Simple;
use App::DuckPAN::TemplateDefinitions;
use Try::Tiny;
use strict;
use Moo::Role;
requires '_run_app';
sub run_restarter {
my ($self, $args) = @_;
lib/App/DuckPAN/Template.pm view on Meta::CPAN
package App::DuckPAN::Template;
our $AUTHORITY = 'cpan:DDG';
# ABSTRACT: Template to generate one file of an Instant Answer
$App::DuckPAN::Template::VERSION = '1021';
# An Instant Answer has multiple templates, each of which can be used
# to generate one output file.
use Moo;
use Try::Tiny;
use Text::Xslate;
use Path::Tiny qw(path);
use namespace::clean;
has name => (
is => 'ro',
required => 1,
doc => 'Name of the template',
);
lib/App/DuckPAN/TemplateDefinitions.pm view on Meta::CPAN
package App::DuckPAN::TemplateDefinitions;
our $AUTHORITY = 'cpan:DDG';
# ABSTRACT: Parse the template definitions file to create templates and template sets
$App::DuckPAN::TemplateDefinitions::VERSION = '1021';
use Moo;
use Try::Tiny;
use Path::Tiny;
use YAML::XS qw(LoadFile);
use App::DuckPAN::Template;
use App::DuckPAN::TemplateSet;
use namespace::clean;
has templates_yml => (
is => 'ro',
lib/App/DuckPAN/TemplateSet.pm view on Meta::CPAN
# A group of templates is a template set. Conceptually this represents a
# sub-type of an instant answer type. For example, a Goodie can be a standard
# Goodie or a Cheat Sheet goodie, each of which corresponds to a template set.
#
# Each template set can have required and optional templates. 'required' templates
# are always used to generate output files, while the user's confirmation is
# needed before each optional template is processed.
use Moo;
use Try::Tiny;
use List::Util qw(all);
use Algorithm::Combinatorics qw(combinations);
use namespace::clean;
has name => (
is => 'ro',
required => 1,
doc => 'Name of the template set',
);
( run in 1.124 second using v1.01-cache-2.11-cpan-05444aca049 )