NAME
App::cpanurl - Get module URL from name and version
CAUTION
This module is alpha release. Features will be changed without warnings.
SYNOPSIS
# http://cpan.metacpan.org/authors/id/S/SR/SRI/Mojolicious-3.82.tar.gz
cpanurl Mojolicious 3.82
# http://cpan.metacpan.org/authors/id/S/SR/SRI/Mojolicious-3.82.tar.gz
# http://cpan.metacpan.org/authors/id/K/KI/KIMOTO/DBIx-Custom-0.23.tar.gz
cpanurl -f module.txt
# module.txt
Mojolicious 3.82
DBIx::Custom 0.23
DESCRIPTIONS
Get module URL
You can get module URL.
# http://cpan.metacpan.org/authors/id/S/SR/SRI/Mojolicious-3.82.tar.gz
cpanurl Mojolicious 3.82
If you want to get many module urls, you can use -f
option and module file.
cpanurl -f module.txt
Module file is the following format.
Mojolicious 3.82
DBIx::Custom 0.23
You can get the following output
http://cpan.metacpan.org/authors/id/S/SR/SRI/Mojolicious-3.82.tar.gz
http://cpan.metacpan.org/authors/id/K/KI/KIMOTO/DBIx-Custom-0.23.tar.gz
Module installation
Use cpanm with cpanurl
to install modules.
cpanurl Mojolicious 3.82 | cpanm
If you want to install many modules, you can create module file.
# module.txt
Mojolicious 3.82
DBIx::Custom 0.23
And use -f
option to read this file.
cpanurl -f module.txt | cpanm
Module name is different from distribution name
Some module name is different from disttribution name.
# Module name Distribution name
LWP libwww-perl
IO::Compress::Base IO-Compress
Cwd PathTools
File::Spec PathTools
List::Util Scalar-List-Utils
Scalar::Util Scalar-List-Utils
For example, the following command failed.
# Fail!
cpanurl LWP 6.04
You must use distribution name in this case.
cpanurl libwww-perl 6.04
HTTP client
cpanurl use two HTTP client as necessary.
These module is used to get module URLs from metaCPAN.
If LWP::UserAgent 5.802+ is installed, LWP::UserAgent is seleced. If not, HTTP::Tiny is selected.
--lwp
option force LWP::UserAgent.
cpanurl --lwp Mojolicious 3.82
--no-lwp
option force HTTP::Tiny.
cpanurl --no-lwp Mojolicious 3.82
HTTP proxy
export http_proxy=http://hostname:3001
http_proxy
environment variable enable you to use proxy server.
HTTP proxy authentication
export http_proxy=http://username:password@hostname:3001
If LWP::UserAgent 5.802+ is installed, proxy authentication is available. HTTP::Tiny don't support proxy authentication.
LICENSE AND COPYRIGHT
Copyright 2013 Yuki Kimoto.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.