Re: Running CPAN as a regular user, installing as root

2007-10-18 Thread Matisse Enzer
On Oct 18, 2007, at 7:53 PM, A. Pagaltzis wrote: * Matisse Enzer <[EMAIL PROTECTED]> [2007-10-18 19:35]: From your shell prompt: sudo cpan No, if you used to use CPAN.pm as root, then instead say this: sudo tar cf - .cpan -C ~root | tar xvf - -C ~ sudo rm -r ~root/.cpan You are

Re: Running CPAN as a regular user, installing as root

2007-10-18 Thread Christopher Laco
Matisse Enzer wrote: > > On Oct 18, 2007, at 5:27 PM, Christopher Laco wrote: > >> cpan -i CPAN >> >> yields: >> >>> Running make install >>> Warning: You do not have permissions to install into >>> //System/Library/Perl/5.8.6/darwin-thread-multi-2level at >>> /System/Library/Perl/5.8.6/ExtUtils/

Re: Running CPAN as a regular user, installing as root

2007-10-18 Thread Matisse Enzer
On Oct 18, 2007, at 5:27 PM, Christopher Laco wrote: cpan -i CPAN yields: Running make install Warning: You do not have permissions to install into //System/ Library/Perl/5.8.6/darwin-thread-multi-2level at /System/Library/ Perl/5.8.6/ExtUtils/Install.pm line 114. Cannot forceunlink /Syste

Re: Running CPAN as a regular user, installing as root

2007-10-18 Thread A. Pagaltzis
* Matisse Enzer <[EMAIL PROTECTED]> [2007-10-18 19:35]: > From your shell prompt: > > sudo cpan No, if you used to use CPAN.pm as root, then instead say this: sudo tar cf - .cpan -C ~root | tar xvf - -C ~ sudo rm -r ~root/.cpan The first line simply produces a copy of .cpan from ~root

Re: Running CPAN as a regular user, installing as root

2007-10-18 Thread Christopher Laco
Matisse Enzer wrote: > I was following the comments in http://use.perl.org/~Alias/journal/34680 > and came across something that was new to me, and seemed worthy of > repeating here - if only one other person learns this it'll be worth it: > > In comment http://use.perl.org/comments.pl?sid=37249&c

Re: get_resource_by_name() - Find full-path of something in @INC

2007-10-18 Thread Matisse Enzer
On Oct 18, 2007, at 4:28 PM, Jonathan Rockway wrote: Eric Wilhelm wrote: If we're voting, I would prefer to avoid having non-modules in @INC. I agree. How about using Module::Install to install files to a known location (auto), and then File::ShareDir to get at those files? Thanks - that

Re: Running CPAN as a regular user, installing as root

2007-10-18 Thread Eric Wilhelm
# from David Cantrell # on Thursday 18 October 2007 15:47: >> That does of course mean that any user can run any command at all as >> root, passwordlessly: all she has to do is create a makefile ... >>           [this] isn't suitable in environments where the purpose of >> the sudoers restrictions

Re: get_resource_by_name() - Find full-path of something in @INC

2007-10-18 Thread Jonathan Rockway
Eric Wilhelm wrote: > If we're voting, I would prefer to avoid having non-modules in @INC. > I agree. How about using Module::Install to install files to a known location (auto), and then File::ShareDir to get at those files? I have had pretty good success with this approach. (My CatalystX::

Re: get_resource_by_name() - Find full-path of something in @INC

2007-10-18 Thread Eric Wilhelm
# from Matisse Enzer # on Thursday 18 October 2007 15:10: >> Module::Finder ? > >I want to find non-module resources, for example, a directory   >containing configuration files that was installed in @INC somewhere. Ah, I missed that bit. Yes you should definitely skip the coderefs then. If we'

Re: Running CPAN as a regular user, installing as root

2007-10-18 Thread David Cantrell
On Thu, Oct 18, 2007 at 07:17:19PM +0100, Smylers wrote: > Eric Wilhelm writes: > > Yep. And if your sudoers file is more restrictive, you might have > > something like this (relative paths aren't allowed in sudoers) > > ewilhelm ALL=(ALL) NOPASSWD: /usr/bin/make install > That does of cour

Re: get_resource_by_name() - Find full-path of something in @INC

2007-10-18 Thread Matisse Enzer
On Oct 18, 2007, at 2:51 PM, Eric Wilhelm wrote: # from Matisse Enzer # on Thursday 18 October 2007 13:31: So, what is Best Way? Module::Finder ? I want to find non-module resources, for example, a directory containing configuration files that was installed in @INC somewhere. My examp

Re: get_resource_by_name() - Find full-path of something in @INC

2007-10-18 Thread Eric Wilhelm
# from Matisse Enzer # on Thursday 18 October 2007 13:31: >So, what is Best Way? Module::Finder ? >And how about those references in @INC? Best to not mess with them unless it is acceptable to actually load the module. Even then, you're very likely to end-up with a buggy reimplementation of

Re: Running CPAN as a regular user, installing as root

2007-10-18 Thread Smylers
Eric Wilhelm writes: > Yep. And if your sudoers file is more restrictive, you might have > something like this (relative paths aren't allowed in sudoers) > > ewilhelm ALL=(ALL) NOPASSWD: /usr/bin/make install That does of course mean that any user can run any command at all as root, pass

get_resource_by_name() - Find full-path of something in @INC

2007-10-18 Thread Matisse Enzer
So I want to find the first occurrence of $thing in @INC, where $thing could be a file or a directory. I want the full path to the first match. Here's my toy solution: $full_path = get_resource_by_name('File/Spec.pm'); # /System/Library/Perl/5.8.6/darwin-thread-multi-2level/File/Spec.pm

Re: Running CPAN as a regular user, installing as root

2007-10-18 Thread Michael G Schwern
Eric Wilhelm wrote: > /usr/local/sbin/mbBuild is: > > #!/bin/sh > ./Build $@ ^^ That should be "$@" or else it will get confused by spaces. On a related note, that sort of thing is generally useful for those of us who find typing ./Build just a little more annoying than "make".

Re: Running CPAN as a regular user, installing as root

2007-10-18 Thread Eric Wilhelm
# from Matisse Enzer # on Thursday 18 October 2007 10:31: >In comment http://use.perl.org/comments.pl?sid=37249&cid=58370 brian   >d foy points out that these days there is a really easy way to run   >CPAN as a normal user, and install as root. Yep. And if your sudoers file is more restrictive,

Re: Running CPAN as a regular user, installing as root

2007-10-18 Thread Christopher H. Laco
Matisse Enzer wrote: > I was following the comments in http://use.perl.org/~Alias/journal/34680 > and came across something that was new to me, and seemed worthy of > repeating here - if only one other person learns this it'll be worth it: > > In comment http://use.perl.org/comments.pl?sid=37249&c

Running CPAN as a regular user, installing as root

2007-10-18 Thread Matisse Enzer
I was following the comments in http://use.perl.org/~Alias/journal/ 34680 and came across something that was new to me, and seemed worthy of repeating here - if only one other person learns this it'll be worth it: In comment http://use.perl.org/comments.pl?sid=37249&cid=58370 brian d foy p