Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • if you don't mind changing your paths a bit, use local::lib '/opt/perl' and forget about it.

    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.
    • I don't mind changing my paths inside regular Perl stuff... works good lasts long time already there.

      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 require, but a "can't find this file in the filesystem" sort of search. Which makes no sense: it knows where to *put* the stuff, why does it not try looking there?

      I suppose the cpan shell doesn't use any non-core modules, so I can't really tell if it would successfully find them for actual use. Almost makes me want to move something essential to the /opt directory, except then the mail server or something would probably explode.
      • 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].

        So, you can either edit /etc/sudoers to keep the value (not recommended) or do something like this. [blogspot.com]

        • I Did Not Know That.

          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!
      • I don't mind changing my paths inside regular Perl stuff... works good lasts long time already there.

        I didn't mean inside Perl, I meant in your shell, like the local::lib examples give:
        eval `perl -Mlocal::lib=/opt/perl`
        (in .bashrc or similar)

        This will cover all the bases -- Module::Install, Module::Build, your arch-specific dirs, etc.

        • The problem is (was) that Module::Install and everybody all worked fine... *if* I installed manually. There didn't seem to be anything wrong with "my" configuration, I just couldn't figure out why the cpan shell, specifically, wasn't honoring it. So it didn't seem like local::lib would help.

          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