Re: Shortest path to a MyConfig

[email protected] (Tyler MacDonald)
Newsgroups perl.cpan.discuss
Message-ID <[email protected]>
Andreas J. Koenig <[email protected]> wrote:
>   =item 5)
> 
>   I am not root, how can I install a module in a personal directory?
> 
>   First of all, you will want to use your own configuration, not the one
>   that your root user installed. The following command sequence is a
>   possible approach:
> 
>       % mkdir -p $HOME/.cpan/CPAN
>       % echo '1;' > $HOME/.cpan/CPAN/MyConfig.pm
>       % cpan
>       [...answer all questions...]

> It looks cool and straight forward. I wonder if you would still
> recommend your own patch now that I have shown you the section 5 of
> the FAQ?

	I saw that before I wrote up the code, since I didn't think that was
terribly user friendly, and it also required the user to RTFM. :) I also
think my version is Win32 compatible (not really sure? could someone with a
windows box test it?) in the instance where Administrator installs perl and
configures CPAN to write to a directory a regular user can't access.

> If yes, I think I'd call it "mkmyconfig".
> 
> And when you could please add a paragraph of documentation, it's in in
> a second.

	OK, I'll re-do my patch with a snippet of docs. I didn't really
consider that somebody might explicitly run

	perl -MCPAN -e 'mkmyconfig'

	, I was more expecting that they'd just try to run shell and get
burned, but both use cases are perfectly valid.

	Cheers,
		Tyler
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.