Ok, getting back to you, ikegami, wrt to where you said:

I haven't played much with sudo and how it affects the environment, but it seems possible that PERL5LIB isn't inherited or set in the child.

I've just run a couple commands in the shell to check this. Recollecting that bash sources /etc/profile for a login shell, we become root using the flag that tells bash it is a login shell, and check its environment:

somian@antique-acer:~/repos$ sudo bash -login -i root@antique-acer:/home/somian/repos# env | grep ^PERL PERL5LIB=/usr/share/perl5

Now we do that same but leave out the -login flag, and PERL5LIB vanishes:

somian@antique-acer:~/repos$ sudo bash -i root@antique-acer:/home/somian/repos# env | grep ^PERL root@antique-acer:/home/somian/repos#

The apparent conclusion is that $PERL5LIB is not inherited when running as root, and furthermore won't be set when bash's root child process starts if one's setup is such that we set it in /etc/profile (which seems to me to be the "right" place for it).

As I wrote before: "I was running as root because I wanted to store my pinto stacks under /usr/local/lib/pinto." Just not one of my brighter ideas, and I put it down to not having enough *nix knowledge. Now I am setting up repositories under my home dir and things are working as they should.

Mar 19, 2025 at 02:42 UTC

In reply to Re^4: LWP::Protocol::https is installed but pinto fails with "Protocol scheme https is not supported" by Intrepid
in thread LWP::Protocol::https is installed but pinto fails with "Protocol scheme https is not supported" by Intrepid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.