NAME

App::CPAN::Get - Base class for cpan-get script.

SYNOPSIS

use App::CPAN::Get;

my $app = App::CPAN::Get->new;
my $exit_code = $app->run;

METHODS

new

my $app = App::CPAN::Get->new;

Constructor.

Returns instance of object.

run

my $exit_code = $app->run;

Run.

Returns 1 for error, 0 for success.

ERRORS

new():
        From Class::Utils::set_params():
                Unknown parameter '%s'.
        Parameter 'lwp_user_agent' must be a LWP::UserAgent instance.

run():
        From App::CPAN::Get::MetaCPAN::search():
               Bad search options.
               Cannot connect to CPAN server.
                       HTTP code: %s
                       HTTP message: %s
               Module '%s' doesn't exist.
               Package doesn't present.

EXAMPLE

use strict;
use warnings;

use App::CPAN::Get;

# Arguments.
@ARGV = (
        'App::Pod::Example',
);

# Run.
exit App::CPAN::Get->new->run;

# Output like:
# Package on 'http://cpan.metacpan.org/authors/id/S/SK/SKIM/App-Pod-Example-0.19.tar.gz' was downloaded.

DEPENDENCIES

App::CPAN::Get::MetaCPAN, App::CPAN::Get::Utils, Class::Utils, Error::Pure, Getopt::Std, LWP::UserAgent, Scalar::Util.

REPOSITORY

https://github.com/michal-josef-spacek/App-CPAN-Get

AUTHOR

Michal Josef Špaček mailto:skim@cpan.org

http://skim.cz

LICENSE AND COPYRIGHT

© 2021-2024 Michal Josef Špaček

BSD 2-Clause License

VERSION

0.12