Permalink
Browse files

update README

  • Loading branch information...
1 parent e77ea99 commit ec0719e04c96b7b93eb3dfb41c7325f30abf3ff8 @miyagawa committed Nov 13, 2012
Showing with 95 additions and 39 deletions.
  1. +91 −35 README
  2. +4 −4 lib/App/cpanminus.pm
View
126 README
@@ -4,42 +4,57 @@ NAME
SYNOPSIS
cpanm Module
- Run `cpanm -h' for more options.
+ Run `cpanm -h' or `perldoc cpanm' for more options.
DESCRIPTION
cpanminus is a script to get, unpack, build and install modules from
- CPAN.
+ CPAN and does nothing else.
- Why? It's dependency free, requires zero configuration, and stands
- alone. When running, it requires only 10MB of RAM.
+ It's dependency free (can bootstrap itself), requires zero
+ configuration, and stands alone. When running, it requires only 10MB of
+ RAM.
INSTALLATION
+ There are several ways to install cpanminus to your system.
+
+ Package management system
There are Debian packages, RPMs, FreeBSD ports, and packages for other
operation systems available. If you want to use the package management
system, search for cpanminus and use the appropriate command to install.
This makes it easy to install `cpanm' to your system without thinking
about where to install, and later upgrade.
+ Installing to system perl
You can also use the latest cpanminus to install cpanminus itself:
curl -L http://cpanmin.us | perl - --sudo App::cpanminus
This will install `cpanm' to your bin directory like `/usr/local/bin'
- (unless you configured `INSTALL_BASE' with local::lib), so you might
+ (unless you configured `INSTALL_BASE' with local::lib), so you probably
need the `--sudo' option.
- Later you can say `cpanm --self-upgrade --sudo' to upgrade to the latest
- version.
+ Installing to local perl (perlbrew)
+ If you have perl in your home directory, which is the case if you use
+ tools like perlbrew, you don't need the `--sudo' option, since you're
+ most likely to have a write permission to the perl's library path. You
+ can just do:
+
+ curl -L http://cpanmin.us | perl - App::cpanminus
- Otherwise,
+ to install the `cpanm' executable to the perl's bin path, like
+ `~/perl5/perlbrew/bin/cpanm'.
+
+ Downloading the standalone executable
+ You can also copy the standalone executable to whatever location you'd
+ like.
cd ~/bin
curl -LO http://xrl.us/cpanm
chmod +x cpanm
# edit shebang if you don't have /usr/bin/env
- just works, but be sure to grab the new version manually when you
- upgrade (`--self-upgrade' might not work).
+ This just works, but be sure to grab the new version manually when you
+ upgrade because `--self-upgrade' might not work for this.
DEPENDENCIES
perl 5.8 or later.
@@ -55,19 +70,16 @@ DEPENDENCIES
QUESTIONS
Another CPAN installer?
-
OK, the first motivation was this: the CPAN shell runs out of memory (or
swaps heavily and gets really slow) on Slicehost/linode's most
affordable plan with only 256MB RAM. Should I pay more to install perl
modules from CPAN? I don't think so.
But why a new client?
-
- First of all, I have no intention to dis CPAN or CPANPLUS developers.
- Don't get me wrong. They're great tools I've used for *literally* years
- (you know how many modules I have on CPAN, right?). I really respect
- their efforts of maintaining the most important tools in the CPAN
- toolchain ecosystem.
+ First of all, let me be clear that CPAN and CPANPLUS are great tools
+ I've used for *literally* years (you know how many modules I have on
+ CPAN, right?). I really respect their efforts of maintaining the most
+ important tools in the CPAN toolchain ecosystem.
However, for less experienced users (mostly from outside the Perl
community), or even really experienced Perl developers who know how to
@@ -76,54 +88,97 @@ QUESTIONS
install some modules and start writing code.
Zero-conf? How does this module get/parse/update the CPAN index?
+ It queries the CPAN Meta DB site at http://cpanmetadb.plackperl.org/.
+ The site is updated at least every hour to reflect the latest changes
+ from fast syncing mirrors. The script then also falls back to scrape the
+ site http://search.cpan.org/.
- It queries the CPAN Meta DB site running on Google AppEngine at
- http://cpanmetadb.appspot.com/. The site is updated every hour to
- reflect the latest changes from fast syncing mirrors. The script then
- also falls back to the site http://search.cpan.org/. I've been talking
- to and working with with the QA/toolchain people for building a more
- reliable CPAN DB website.
-
- Fetched files are unpacked in `~/.cpanm'. You can configure this with
- the `PERL_CPANM_HOME' environment variable.
+ Fetched files are unpacked in `~/.cpanm' and automatically cleaned up
+ periodically. You can configure the location of this with the
+ `PERL_CPANM_HOME' environment variable.
Where does this install modules to? Do I need root access?
-
It installs to wherever ExtUtils::MakeMaker and Module::Build are
- configured to (via `PERL_MM_OPT' and `MODULEBUILDRC'). So if you're
- using local::lib, then it installs to your local perl5 directory.
- Otherwise it installs to the siteperl directory.
+ configured to (via `PERL_MM_OPT' and `PERL_MB_OPT'). So if you're using
+ local::lib, then it installs to your local perl5 directory. Otherwise it
+ installs to the site_perl directory that belongs to your perl.
cpanminus at a boot time checks whether you have configured local::lib,
- or have the permission to install modules to the sitelib directory. If
+ or have the permission to install modules to the site_perl directory. If
neither, it automatically sets up local::lib compatible installation
path in a `perl5' directory under your home directory. To avoid this,
run the script as the root user, with `--sudo' option or with
`--local-lib' option.
+ cpanminus can't install the module XYZ. Is it a bug?
+ It is more likely a problem with the distribution itself. cpanminus
+ doesn't support or is known to have issues with distributions like as
+ follows:
+
+ * Tests that require input from STDIN.
+
+ * Tests that might fail when `AUTOMATED_TESTING' is enabled.
+
+ * Modules that have invalid numeric values as VERSION (such as `1.1a')
+
+ These failures can be reported back to the author of the module so that
+ they can fix it accordingly, rather than me.
+
+ Does cpanm support the feature XYZ of CPAN and CPANPLUS?
+ Most likely not. Here are the things that cpanm doesn't do by itself.
+ And it's a feature - you got that from the name *minus*, right?
+
+ If you need these features, use CPAN, CPANPLUS or the standalone tools
+ that are mentioned.
+
+ * Bundle:: module dependencies
+
+ * CPAN testers reporting
+
+ * Building RPM packages from CPAN modules
+
+ * Listing the outdated modules that needs upgrading. See
+ App::cpanoutdated
+
+ * Uninstalling modules. See pm-uninstall.
+
+ * Showing the changes of the modules you're about to upgrade. See
+ cpan-listchanges
+
+ * Patching CPAN modules with distroprefs.
+
+ See cpanm or `cpanm -h' to see what cpanminus *can* do :)
+
COPYRIGHT
Copyright 2010- Tatsuhiko Miyagawa
The standalone executable contains the following modules embedded.
+ CPAN::DistnameInfo Copyright 2003 Graham Barr
Parse::CPAN::Meta Copyright 2006-2009 Adam Kennedy
local::lib Copyright 2007-2009 Matt S Trout
HTTP::Tiny Copyright 2011 Christian Hansen
Module::Metadata Copyright 2001-2006 Ken Williams. 2010 Matt S Trout
+ version Copyright 2004-2010 John Peacock
+ JSON::PP Copyright 2007−2011 by Makamaka Hannyaharamitu
+ CPAN::Meta Copyright (c) 2010 by David Golden and Ricardo Signes
+ Try::Tiny Copyright (c) 2009 Yuval Kogman
+ parent Copyright (c) 2007-10 Max Maischein
+ Version::Requirements copyright (c) 2010 by Ricardo Signes
+ CPAN::Meta::YAML copyright (c) 2010 by Adam Kennedy
+
LICENSE
Same as Perl.
CREDITS
CONTRIBUTORS
-
Patches and code improvements were contributed by:
Goro Fuji, Kazuhiro Osawa, Tokuhiro Matsuno, Kenichi Ishigaki, Ian
- Wells, Pedro Melo, Masayoshi Sekimura, Matt S Trout, squeeky, horus and
- Ingy dot Net.
+ Wells, Pedro Melo, Masayoshi Sekimura, Matt S Trout (mst), squeeky,
+ horus and Ingy dot Net.
ACKNOWLEDGEMENTS
-
Bug reports, suggestions and feedbacks were sent by, or general
acknowledgement goes to:
@@ -137,6 +192,7 @@ COMMUNITY
http://github.com/miyagawa/cpanminus - source code repository, issue
tracker
irc: - discussions about Perl toolchain. I'm there.
+
NO WARRANTY
This software is provided "as-is," without any express or implied
warranty. In no event shall the author be held liable for any damages
View
@@ -9,7 +9,7 @@ App::cpanminus - get, unpack, build and install modules from CPAN
cpanm Module
-Run C<cpanm -h> for more options.
+Run C<cpanm -h> or C<perldoc cpanm> for more options.
=head1 DESCRIPTION
@@ -114,9 +114,9 @@ writing code.
=head2 Zero-conf? How does this module get/parse/update the CPAN index?
-It queries the CPAN Meta DB site running on Google AppEngine at
-L<http://cpanmetadb.plackperl.org/>. The site is updated every hour to reflect
-the latest changes from fast syncing mirrors. The script then also falls back
+It queries the CPAN Meta DB site at L<http://cpanmetadb.plackperl.org/>.
+The site is updated at least every hour to reflect the latest changes
+from fast syncing mirrors. The script then also falls back
to scrape the site L<http://search.cpan.org/>.
Fetched files are unpacked in C<~/.cpanm> and automatically cleaned up

0 comments on commit ec0719e

Please sign in to comment.