[za-pm] cpan useage

List Mail liamton00 at gmail.com
Thu Mar 17 02:57:42 PDT 2011


Hi Anne,

On Sat, Mar 5, 2011 at 11:02 PM, Anne Wainwright
<anotheranne at fables.co.za> wrote:
> Note: Beware! Default reply-to is to the list.
>
>
> Hi,
>
> A couple of notes & queries.
>
> one.
> I had for some unknown reason been using '$ sudo cpan', except that
> certain things would not install without the 'sudo'
>
> I had no idea why, but want someone to baby-step me here and say,
> "That's right, no sudo"

Have you read the "Life with CPAN" articles on the web. There is one
that says how to install modules if you're not root, etc.
What I picked up from there was that you can set your make install
command to 'sudo make install' and of course do the same for 'Build
install' command.

That allows you to easily do cpan module::name to install it, still
keeping the .dot directories in your logged in user's ownership.
The file I change to do this is called MyConfig.pm under ~/.cpan/CPAN.

$ grep sudo MyConfig.pm
  'make_install_make_command' => q[sudo /usr/bin/make],
  'mbuild_install_build_command' => q[sudo ./Build],

Hope this helps :)


More information about the Za-pm mailing list