https://bugzilla.redhat.com/show_bug.cgi?id=1158873 Bug ID: 1158873 Summary: cpan should offer creating site directories Product: Fedora Version: rawhide Component: perl-CPAN Keywords: FutureFeature Assignee: ppisar@xxxxxxxxxx Reporter: ppisar@xxxxxxxxxx QA Contact: extras-qa@xxxxxxxxxxxxxxxxx CC: cweyl@xxxxxxxxxxxxxxx, extras-qa@xxxxxxxxxxxxxxxxx, iarnell@xxxxxxxxx, jplesnik@xxxxxxxxxx, kasal@xxxxxx, perl-devel@xxxxxxxxxxxxxxxxxxxxxxx, ppisar@xxxxxxxxxx, psabata@xxxxxxxxxx, rc040203@xxxxxxxxxx, tcallawa@xxxxxxxxxx, unclebob@xxxxxxxxxxxxxxxxxxxx Depends On: 1090112 +++ This bug was initially created as a clone of Bug #1132321 +++ Description of problem: The command cpan install WeakRef installed the module incorrectly into /root/perl5/lib/perl5/x86_64-linux-thread-multi/auto instead of the global directory. Version-Release number of selected component (if applicable): perl-CPAN-2.00-289.fc20.noarch How reproducible: Every time. Steps to Reproduce: As root enter- 1. yum install perl-CPAN 2. cpan install WeakRef 3. Actual results: Module installed in /root/perl5/..... Expected results: Module installed in /usr/local/share/perl5 Additional info: It is possible to clear this bug by removing /root/.cpan and /root/perl5/, editing out the two lines cpan adds to /root/.bashrc, closing the shell and reopening then rerunning the command, but selecting manual as the installation method. --- Additional comment from Petr Pisar on 2014-08-21 11:09:19 GMT --- This is matter of cpan tool configuration. If you configured cpan to install files into ~/perl5, then it will install it there. If you remove ~/.cpan/CPAN/MyConfig.pm (or the global one under /usr/share/perl5), and run cpan(1) again, you get question, where how to install the files: Warning: You do not have write permission for Perl library directories. To install modules, you need to configure a local Perl library directory or escalate your privileges. CPAN can help you by bootstrapping the local::lib module or by configuring itself to use 'sudo' (if available). You may also resolve this problem manually if you need to customize your setup. What approach do you want? (Choose 'local::lib', 'sudo' or 'manual') The message is a little bit misleading, because the real error is that /usr/local/{lib*,share}/perl5 do not exist. If select `manual' or if you create the directories, cpan will install into the site perl directories. --- Additional comment from on 2014-08-21 11:33:40 GMT --- Granted, but the point is that installing out of the box cpan doesn't work. By reading the code and experimenting I manged to get it to life, but for the ordinary user this would be a pain. As supplied cpan does not let you install modules. To my mind this is wrong. --- Additional comment from Petr Pisar on 2014-08-21 11:41:31 GMT --- Who said that "installing out of the box" means "install into site directories"? --- Additional comment from Petr Pisar on 2014-08-21 14:43:59 GMT --- I think the cpan(1) tool could be augmented to create the site directories if they are missing. Referenced Bugs: https://bugzilla.redhat.com/show_bug.cgi?id=1090112 [Bug 1090112] Review Request: perl-CPAN - Query, download and build perl modules from CPAN sites -- You are receiving this mail because: You are on the CC list for the bug. Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=y9GdUxTleH&a=cc_unsubscribe -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel