No, not CPAN, cpan... the shell. And just the installation on my server.
See, the server runs Debian, so to keep from stepping on package-managed libraries, we have
However, for some reason, the cpan shell doesn't find
And then it asks again. No, you can't install it, I say. And it does again anyway, probably because it finally notices that my CPAN::MyConfig says to do so without asking. That's an open bug in Module::Install, which I could live with except it proceeds to install Test::More oh, about a dozen times, sometimes asking, sometimes not.
And then I cuss, because the Moose install itself "fails" for lack of these dependencies, and now I have to do a force install, which is gonna reinstall Test::More and fail to find it ANOTHER dozen times. Yeesh, it's gonna wear a groove in the hard drive there.
Running it with 'perl -I/opt/perl/lib -MCPA..." doesn't help, which isn't too surprising since it's already in PERL5LIB and isn't picking it up from there.
I'm thinking the Perl programs probably wouldn't find Moose &c on their own either, but they all have explicit "use lib"s in there because they're run from users who may not have the appropriate environment set up. So it's probably not actually cpan-shell-specific.
But huh... explicitly editing
Is making me crazy.
[Edit: The solution came up via the comments. Turns out that PERL5LIB wasn't being passed, it only looked like it was. "sudo env PERL5LIB=$PERL5LIB cpan" brings it over. Yay! There are also some good and interesting ideas on administering Perl under Debian in there.]
local::lib (Score:1)
I'd say you're missing the arch-specific dirs (you probably are), but that can't be all, because that wouldn't explain Moose and Test::More.
Re: (Score:1)
It's just when I'm sudo'd to run the cpan shell. I can't change root's paths (at least, not permanently) without defeating the purpose of having the libs separated. And even so, I'm doing a straight-up sudo, and PERL5LIB carries over.
So I'm not at all sure that's the actual problem... it seems like whatever's doing the installation (Module::Install, I think) is failing to locate it internally. Not a failed r
Re: (Score:1)
And even so, I'm doing a straight-up sudo, and PERL5LIB carries over.
Are you sure? I believe that by default sudo will clear PERL5LIB because of a security issue [debian.org].
/etc/sudoers to keep the value (not recommended) or do something like this. [blogspot.com]
So, you can either edit
Re: (Score:1)
Neither did my sysadmin/husband (though when I mentioned it, he went off into talking-to-the-ceiling land: "Huh! Yeah, that would... oh, then you could... yeah, that could be a problem... but you could... no... ")
And hey, passing it on the command line works. Thanks!
Re: (Score:1)
I didn't mean inside Perl, I meant in your shell, like the local::lib examples give:
.bashrc or similar)
eval `perl -Mlocal::lib=/opt/perl`(in
This will cover all the bases -- Module::Install, Module::Build, your arch-specific dirs, etc.
Re: (Score:1)
The key, it turns out, was that by the time I reached "make install," the only bit done with sudo, my personal PERL5LIB had already set all the appropriate paths, so the fact that it wasn't being passed wasn't a concern
Have you tried dh-make-perl? (Score:2)
I've been using Debian for quite a few years now and I've reached the position where I really don't like to install anything onto a machine that's not Debian packaged - if nothing else, it makes it easy to remove stuff :-)
To build a Debian package from a CPAN distribution, just do something like this:
This will download the latest tarball from CPAN, unpack it, throw together a skeleton 'debian' directory, and then build the .deb package using the normal CPAN make; m
Re: (Score:1)
Re: (Score:1)
In which case, if you are serious about that, you should compile your own Perl from source for use in your code; which would would also mean you wouldn’t have to configure any paths.
Maybe it's (shudder) something you've done? (Score:1)
Re: (Score:1)
I've also considered pretending it's a Windows box: chmod 0777 everything, run as root, and reinstall from scratch every couple of weeks... just so I could ignore OS details until the Perl is finished. And also (okay, mostly) because it's fun to suggest that to a security-conscious sysadmin.
So, no problem with cpan? (Score:2)
I don't think there is anything wrong (at least for you) with the cpan script. It looks like you thought PERL5LIB was one thing but it wasn't, and that's why things failed. That's going to be a problem with any Perl script.
Re: (Score:1)
I had thought I had checked it, by su'ing to root and looking at it, and it's properly set there. I didn't realize sudo and su behaved differently in that respect, so I thought I'd eliminated that problem. The fact that that was the only solution I was coming across in Google probably should have told me something, I guess.
Just a thought... (Score:1)
http://debianpkgs.cpan.org/ [cpan.org]
for both a mirror with pre-built packages of the most used distributions, as well as tools to build them yourself?
Integrates nicely with debian and doesn't mess with official packages as provided by the official debian repositories
Re: (Score:1)
Innnnnteresting. I'll throw that at my sysadmin. Thanks.