Coder Social home page Coder Social logo

cpanminus's Introduction

App::cpanminus - get, unpack, build and install modules from CPAN

This repository contains two distributions:

  • App-cpanminus: fatpacked cpanm frontend
  • Menlo: backend modules and libraries

The repository is shared because a monorepo makes it easier to keep the history and releases in sync, as well as to share GitHub issues and PRs.

cpanminus's People

Contributors

atoomic avatar autarch avatar benkasminbullock avatar charsbar avatar chromatic avatar dolmen avatar doy avatar eserte avatar garu avatar gfx avatar haarg avatar hoelzro avatar ilmari avatar jandubois avatar kahlil-hodgson avatar kraih avatar melo avatar midlifexis avatar miyagawa avatar moznion avatar oalders avatar rbuels avatar rjbs avatar rsp avatar skaji avatar smylers avatar tokuhirom avatar xaicron avatar xdg avatar yannk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cpanminus's Issues

cpanm --sudo Module fails with `mkdir /home/avar/.cpanm/work/1270553591.5027: Permission denied'

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".

Pluggable logger

Examples: colorful output on success/failure. progress bar in downloads

Archive::Zip

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.

Typo in a manpage?

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?

Refactor commands

Some commands like --look are implemented in a very dirty way. We need a cleaner abstraction of dispatching commands.

Better dist deps deduplication

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.

Implement --bootstrap command

Maybe disable the current automatic bootstrapping and instead implement --bootstrap command to setup the toolchain etc.

add resources to META.yml

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

confusing failure

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.

incorrect parsing of module version numbers

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.

Doesn't work with perl 5.8?

miyagawa: Undefined subroutine &version::(<=> called at /loader/0x1b130a8/App/cpanminus/script.pm line 819

Dedupe flattened depedencies

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.

closing STDIN makes more harms than goods

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.

Implement --askme

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.

cpanm invocations inside a cpanm --look shell don't use the correct paths

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).

Implement --mirror-only

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.

Support UNINST=1

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.