| 1 | package App::DuckPAN::Cmd::Query; | ||
| 2 | 1 | our $AUTHORITY = 'cpan:DDG'; | |
| 3 | # ABSTRACT: Command line tool for testing queries and see triggered instant answers | ||
| 4 | 1 | $App::DuckPAN::Cmd::Query::VERSION = '1021'; | |
| 5 | 1 | ▶ | use MooX; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | with qw( App::DuckPAN::Cmd App::DuckPAN::Restart ); | |
| 7 | |||
| 8 | 1 | ▶ | use MooX::Options protect_argv => 0; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 0 | ▶ | sub run { |
|
Subroutine
run: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 11 | 0 | my ($self, @args) = @_; | |
| 12 | |||
| 13 | 0 | exit $self->run_restarter(\@args); | |
| 14 | } | ||
| 15 | |||
| 16 | 0 | ▶ | sub _run_app { |
|
Subroutine
_run_app: not called CC=1 SCAR=6.9
| |||
| 17 | 0 | my ($self, $args) = @_; | |
| 18 | |||
| 19 | 0 | $self->app->check_requirements; # Will exit if missing | |
| 20 | 0 | my @blocks = @{$self->app->ddg->get_blocks_from_current_dir(@$args)}; | |
| 21 | |||
| 22 | 0 | require App::DuckPAN::Query; | |
| 23 | 0 | App::DuckPAN::Query->run($self->app, \@blocks); | |
| 24 | } | ||
| 25 | |||
| 26 | 1 | 1; | |
| 27 | |||
| 28 | __END__ | ||