miyagawa / cpanminus Goto Github PK
View Code? Open in Web Editor NEWcpanminus - get, unpack, build and install modules from CPAN
Home Page: http://cpanmin.us
cpanminus - get, unpack, build and install modules from CPAN
Home Page: http://cpanmin.us
miyagawa: Undefined subroutine &version::(<=> called at /loader/0x1b130a8/App/cpanminus/script.pm line 819
currently it invokes perl command to check the currently installed modules. This could be improved to locate files in @inc and then use MM::parse_version etc.
I notice the text of the pod suggests github and that more bugs are on here. you can add resources to META.yml and it will change the bugtracker on search.cpan.org and will also show a repository link. here's an example of my dist. (more kinds of resources exist)
resources:
bugtracker: http://github.com/xenoterracide/Template-ShowStartStop/issues
repository: http://github.com/xenoterracide/Template-ShowStartStop
Should set non-zero exit one of the dists failed to install etc.
Some commands like --look are implemented in a very dirty way. We need a cleaner abstraction of dispatching commands.
from TIMB
Firstly, thanks! cpanminus is great.
It's useful for cpanminus to be able to install many modules with a single command. We use something like "cpanm $(cat modules.txt)" to
install/update many modules.
The Test::Warn distro uses a .zip file so needs Archive::Zip installed. Sadly, adding Archive::Zip to modules.txt doesn't work because cpanm has
already decided that's it's not available so won't use it, even though it's been installed by the time it's needed.
Changing this chunk:
} elsif (eval { require Archive::Zip }) {
$self->chat("You have Archive::Zip $Archive::Zip::VERSION\n");
$self->{_backends}{unzip} = sub {
my($self, $file) = @_;
my $zip = Archive::Zip->new();
...
};
} else {
$self->{_backends}{unzip} = sub {
die "Failed to extract $_[1] - You need to have unzip or Archive::Zip installed.\n";
};
}
to something like this:
} else {
$self->{_backends}{unzip} = sub {
eval { require Archive::Zip }
or die "Failed to extract $_[1] - You need to have unzip or Archive::Zip installed.\n";
my($self, $file) = @_;
my $zip = Archive::Zip->new();
...
};
}
would fix it.
something like http://gist.github.com/327960
To reproduce, use this happily for a while:
sudo cpanm Mod Ule S
Then discover the --sudo switch:
cpanm --sudo Mo Re Modu Les
That dies with the above error. Workaround:
sudo chown -R avar /home/avar/.cpanm
Since I always used sudo cpanm
root owned my ~/.cpanm.
It would be nice if cpanm
either used sudo
with the --sudo switch to work with the ~/.cpanm
tree or issued an explicit error saying "Your ~/.cpanm has to be owned by you, silly".
000 [16:09:58] doy@zaon Moose(g) $ PERL_CPANM_OPT= cpanm NetHack::Item
Fetching http://search.cpan.org/CPAN/authors/id/D/DO/DOY/NetHack-Item-0.12.tar.gz ... OK
Configuring NetHack-Item-0.12 ... OK
Invalid version format (non-numeric data) at /loader/0x1157d60/App/cpanminus/script.pm line 835.
and cpanm just exits at that point. Not sure what exactly is triggering that.
Installing Task::Dist::Zilla will try to install Dist::Zilla bunch of times, even though they're deduplicated after the file fetch, it should be kept earlier to not even try.
Examples: colorful output on success/failure. progress bar in downloads
If dist A depends on X, Y and Z which are all in the same distro Foo, cpanm fetches Foo tarball three times, which is a waste of bandwidth/time.
app-support use of local::lib doesn't need those build tools environment setup.
which will prompt one of the build/test fails. The answers would be: bailout, proceed, force install or look. Plugins might be able to register actions here, like report to CPAN or nopaste the build.log.
which means --local-lib-self-contrained
like CPAN shell's // find. Could be pluggable to search dists on github for instance.
This should be a patch against local::lib
There are many modules that fail when STDIN is closed during the tests. We should stop doing it by default and instead set AUTOMATED_TESTING which makes most libraries to skip reading from STDIN. This is not a correct use of AUTOMATED_TESTING but the reality is that it should give a better experience.
Support META.json and MYMETA.json with META spec v2 format.
http://search.cpan.org/~dagolden/CPAN-Meta-2.110930/lib/CPAN/Meta/Spec.pm
If I'm using --look, I'm not actually trying to install something, so it shouldn't try to skip installed dists.
Maybe disable the current automatic bootstrapping and instead implement --bootstrap command to setup the toolchain etc.
so file:// should always use File::Copy etc.
Debian for instance doesn't have installsitelib directory until some modules are installed.
This issue is now dedicated to the XML::SAX error and the original issue is moved to https://github.com/miyagawa/cpanminus/issues#issue/82
It installs OK, but chokes at runtime in App::FatPacker's @inc hook sub.
Or a way to skip CPAN.pm bootstrap in its Makefile.PL
There's no official way to check the installed module versions if given a distribution name but we can use a heuristics or .packlist to figure out which is the main module to test.
In the --self-upgrade section:
Upgrades itself. It's just an alias for:
cpanm --skip-install App::cpanminus
While --skip-install is not mentioned anywhere else. Shouldn't there be --skip-installed, or is docs missing something?
to install modules that are deprecated in core
cpanminus places the .cpanm directory in "$ENV{HOME}" by default, which normally won't exist in Windows. Using "$ENV{HOMEDRIVE}$ENV{HOMEPATH} on Windows instead would use the proper location.
tokuhirom/cpanminus has no-xs branch
The current code to handle newlines etc. are shitty.
XML::LibXML on OS X 5.10.1 (because xml2-config fails somehow?)
In --sudo mode with vendor perl like Debian's you might need to set UNINST=1 to remove other instances of core modules in @inc.
Implement the code to parse 02packages to find modules without hitting cpanmetadb nor search.cpan.org, as well as a flag --mirror-only, which makes it possible to use minicpan or DPAN without any plugins.
000 [13:39:53] doy@zaon ~ $ cpanm XML::SAX::ParserFactory
Fetching http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-SAX-0.96.tar.gz ... OK
Configuring XML-SAX-0.96 ... OK
Building and testing XML-SAX-0.96 for XML::SAX::ParserFactory ... OK
Successfully installed XML-SAX-0.96 (upgraded from 1.01)
This is because $XML::SAX::ParserFactory::VERSION == 1.01, even though the dist version for XML::SAX is 0.96.
We can hit cpanmetadb to get a dist name and then hit SCO's /meta service to get metadata if all we have to is to display info (like showing dependencies).
Old AutoInstall version causes issues in installing dependencies.
I was using cpanm --look to run some module tests, and while inside the shell that opened for me, I tried using cpanm --sudo to install some modules globally... this actually just ended up installing root-owned files into ~/perl5 without any kind of warning (I'm assuming because the warning was already given when I ran the initial cpanm --look without sudo).
To supress all network related commands
this should be comparable to cpan> upgrade
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.