The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!/usr/bin/env perl
# PODNAME: duckpan
# ABSTRACT: Command line tool for using the DuckPAN of DuckDuckGo

my @libs;

BEGIN {
    use Getopt::Long qw/:config bundling pass_through/;
    GetOptions 'include|I=s' => \@libs;
    @libs = split ',', join ',', @libs;
}
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 0.152

=head1 DESCRIPTION

See L<App::DuckPAN> for more information.

=head1 DuckPAN

The DuckDuckHack Testing Tool

=head2 SYNPOSIS

DuckPAN is an application built to provide developers a testing environment for DuckDuckHack Instant Answers. It allows you to test instant answer triggers and preview their visual design and output.

=head2 INSTALLATION

Please see L<https://github.com/duckduckgo/p5-app-duckpan#installing-duckpan> for all information regarding the installation of DuckPAN.

=head2 COMMANDS

B<duckpan check>:
    Checks if you fulfill all requirements for the development environment. This will run automatically during a B<duckpan release>.

B<duckpan query>:
    Test Goodie and Spice triggers interactively on the command line. For each query, the instant answers triggered will be displayed. This tool should be used to ensure your instant answer triggers correctly.

B<duckpan server>: [--verbose] [--no-cache]
    Starts a local web server, which emulates the DuckDuckGo production environment. Allows for live testing of Goodie and Spice instant answers.  This tool should be used to ensure your instant answer displays correctly. For Spice instant answers, this is especially important to verify API calls are successful and no JavaScript errors exist.

    -v, --verbose:
        Provides more output from server

    --no-cache:
        Forces the cache to be repopulated each time the server starts (defaults to using cached copies of assets unless newer versions exist)

B<duckpan help>:
    Shows you the DuckPAN help page which briefly describes DuckPAN and its features.

B<duckpan test>:
    Tests your release, by running the tests in the B<t/> directory using Dzil (if a dist.ini exists) or prove. This will run automatically during a B<duckpan release>.

B<duckpan installdeps>:
  Attempt to install dependencies for the distribution in your current directory using cpanm.

B<duckpan roadrunner>:
  Same as installdeps, but without testing them. Meep meep!

B<duckpan poupload>:
    Upload a po file to the Community Platform. This is for Translation Managers only.

B<duckpan publisher>:
    Starts a local web server which displays static websites created with L<DuckDuckGo-Publisher|https://github.com/duckduckgo/duckduckgo-publisher>.

B<duckpan release>:
    Pushes a new release of the current project (ie. Spice, Goodie or Publisher) to L<DuckPAN.org|http://duckpan.org>

B<duckpan setup>:
  Helps configure your environment so you can use L<Dist::Zilla::Plugin::UploadToDuckPAN>, which is used by B<duckpan release>.

=head2 ENVIRONMENT VARIABLES

B<duckpan env name value>
    Add an environment variable that DuckPAN will remember. This is specifically useful for Spice API keys. Variables are stored in ~/.duckpan/env.ini

B<duckpan env rm name>
    Remove an environment variable from DuckPAN. 

=head2 PARAMETERS

B<duckpan -Ilib>:
    Loads the specified external library. This should be used to test changes made to L<App::DuckPAN> and L<DDG>. Example: loading modified DuckPAN modules C<duckpan -I../p5-app-duckpan/lib server>.

=head1 SEE ALSO

=over 4

=item L<https://github.com/duckduckgo/p5-app-duckpan>

=item L<https://github.com/duckduckgo>

=item L<https://duckduckgo.com>

=item L<https://duck.co>

=item L<http://duckpan.org>

=back

=head1 CONTRIBUTION

To contribute to DuckPAN, please visit L<https://github.com/duckduckgo/p5-app-duckpan>. We also welcome and encourage contributions from our community. Please visit L<http://duckduckhack.com/> to contribute new instant answers, or visit L<https://duck.co/ideas> to share your ideas and instant answer source suggestions.

=head2 SUPPORT

B<IRC>:

    We invite you to join us at B<#duckduckgo> on B<irc.freenode.net> for any queries and lively discussion.

B<Repository>:

    L<https://github.com/duckduckgo/p5-app-duckpan>

B<Issue Tracker>:

    https://github.com/duckduckgo/p5-app-duckpan/issues

=head1 AUTHOR

Torsten Raudssus <torsten@raudss.us> L<https://raudss.us/>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by DuckDuckGo, Inc. L<https://duckduckgo.com/>.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut