App-DuckPAN

 view release on metacpan or  search on metacpan

lib/App/DuckPAN.pm  view on Meta::CPAN

package App::DuckPAN;
our $AUTHORITY = 'cpan:DDG';
# ABSTRACT: The DuckDuckGo DuckPAN client
$App::DuckPAN::VERSION = '1021';
use feature 'state';

use Moo;
use MooX::Cmd;
use MooX::Options;
use App::DuckPAN::Config;
use File::Which;
use Class::Load ':all';
use HTTP::Request::Common qw( GET POST );
use HTTP::Status;
use List::Util qw( first max );
use LWP::UserAgent;
use LWP::Simple;
use Parse::CPAN::Packages::Fast;
use File::Temp qw/ :POSIX /;
use Term::ANSIColor;
use Term::UI;
use Term::ReadLine;
use Carp;
use Encode;
use Perl::Version;
use Path::Tiny;
use open qw/:std :utf8/;
use App::DuckPAN::Cmd::Help;
use DDG::Meta::Data;

no warnings 'uninitialized';

option dev_version => (
	is => 'ro',
	default => 9.999,
	doc => 'Version used when using unreleased code, e.g. git repos'
);

option check => (
	is          => 'ro',
	lazy        => 1,
	negativable => 1,
	default     => sub { 1 },
	doc         => 'perform requirements checks. turn off with --no-check',
);

option empty => (
	is          => 'ro',
	lazy        => 1,
	short       => 'e',
	default     => sub { 0 },
	doc         => 'empty duckpan cache at start-up',
);

has cachesec => (
	is      => 'ro',
	lazy    => 1,
	default => sub { 60 * 60 * 4 },    # 4 hours by default
);

option colors => (
	is          => 'ro',
	lazy        => 1,
	negativable => 1,
	default     => sub { 1 },
	doc         => 'use color output. turn off with --no-colors',
);

option verbose => (
	is      => 'ro',
	lazy    => 1,
	short   => 'v|debug',
	default => sub { 0 },



( run in 0.941 second using v1.01-cache-2.11-cpan-3c2a17b8caa )