Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document usage of options in cpanfile #579

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions App-cpanminus/script/cpanm.PL
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,28 @@ controlled repository such as git.

cpanm --installdeps .

When installing from a L<cpanfile>, cpanm recognizes the
L<options|Module::CPANfile/options_for_module> C<dist>, C<mirror>,
and C<url> passed as key-value pairs after the optional version
specification, specifying the exact distribution or location to
install from.

requires 'Path::Class', '0.26',
dist => 'KWILLIAMS/Path-Class-0.26.tar.gz';

# omit version specifier
requires 'Hash::MultiValue',
dist => 'MIYAGAWA/Hash-MultiValue-0.15.tar.gz';

# use dist + mirror
requires 'Cookie::Baker',
dist => 'KAZEBURO/Cookie-Baker-0.08.tar.gz',
mirror => 'http://cpan.cpantesters.org/';

# use the full URL
requires 'Try::Tiny', '0.28',
url => 'http://backpan.perl.org/authors/id/E/ET/ETHER/Try-Tiny-0.28.tar.gz';

=item --look

Download and unpack the distribution and then open the directory with
Expand Down