Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: System vs. User module version of List::Util

by Lady_Aleena (Priest)
on Jun 18, 2017 at 06:15 UTC ( [id://1193036]=note: print w/replies, xml ) Need Help??


in reply to Re: System vs. User module version of List::Util
in thread System vs. User module version of List::Util

When I said "from the command line", I sshed into my account, and read the perldoc there. I was not talking about from my system's command line.

And darn it! My local List::Util has uniq.

And this is just great, for my stuff for the browser, I am stuck with 5.8.8; but on the command line of my web host, I have 5.24.2. That's so not fair! (And not a PM problem.)

And yes, my web host has List::MoreUtils installed, and I used it instead. Thanks!

No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
Lady Aleena

Replies are listed 'Best First'.
Re^3: System vs. User module version of List::Util
by dsheroh (Monsignor) on Jun 18, 2017 at 08:40 UTC
    And this is just great, for my stuff for the browser, I am stuck with 5.8.8; but on the command line of my web host, I have 5.24.2. That's so not fair! (And not a PM problem.)
    This is actually something that you can probably fix.

    On the command line, run which perl to get the path to the perl binary that you're using there. Now modify the shebang line at the top of your web script to match (e.g., if which perl says /home/aleena/perlbin/perl, then, in your web script, change #!/usr/bin/perl to #!/home/aleena/perlbin/perl) and your web script should now run in the same version of Perl as you get on the command line, and with the same compile-time settings, including the default value of @INC.

      Modifying the shebang won't work, since I do not have the same set up as my webhost. So a custom shebang for my webhost would make my scripts (286 of them) fail locally. That is why I have to code for 5.8.8 (web) even though I have 5.22.2 locally and my web host have 5.24.2 at the command line.

      I am so screwed up.

      No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
      Lady Aleena
        "...my scripts (286 of them) fail locally...code for 5.8.8 (web)...have 5.22.2 locally...web host have 5.24.2...I am so screwed up"

        No wonder. Sounds like a terrible setup.

        There is a nice german word: "beratungsresistent". Some translate it with stubborn but this don't really fit.

        Best regards, Karl

        «The Crux of the Biscuit is the Apostrophe»

        Furthermore I consider that Donald Trump must be impeached as soon as possible

      Addendum:

      which perl returns /usr/local/cpanel/3rdparty/bin/perl.

      I don't have cpanel on my computer, so again, changing the shebang to match that would still make my local copies fail, I think.

      No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
      Lady Aleena

        Find the CPanel perl version (/usr/local/cpanel/3rdparty/bin/perl -v; or, with -V option instead in case to match the version as close as possible) in order to install locally on your system. You do not need CPanel to run the same version of perl & modules.

Re^3: System vs. User module version of List::Util
by karlgoethebier (Abbot) on Jun 18, 2017 at 08:28 UTC

    BTW, you use Debian, right? You should consider to use Perlbrew.

    Regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

    Furthermore I consider that Donald Trump must be impeached as soon as possible

      I just went to the link. I don't see what Perlbrew can do for me. I only have 1 version of perl on my PC. I already install cpan modules without cpan sudo (into my $HOME directory). So what else can it do that isn't obvious?

      No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
      Lady Aleena
        "...what else..."

        You can easily switch between different versions of Perl to avoid some surprises:

        karls-mac-mini:uagent karl$ perlbrew list 5.14.2threads perl-5.16.2 perl-5.16.3 perl-5.17.7 perl-5.18.0 perl-5.18.1 perl-5.18.2 perl-5.18.2threads perl-5.20.0 perl-5.20.0threads perl-5.22.1-threads * perl-5.24.1threads karls-mac-mini:uagent karl$ perlbrew switch perl-5.18.0 karl-mac-mini:uagent karl$ perlbrew list 5.14.2threads perl-5.16.2 perl-5.16.3 perl-5.17.7 * perl-5.18.0 perl-5.18.1 perl-5.18.2 perl-5.18.2threads perl-5.20.0 perl-5.20.0threads perl-5.22.1-threads perl-5.24.1threads

        «The Crux of the Biscuit is the Apostrophe»

        Furthermore I consider that Donald Trump must be impeached as soon as possible

        I already install cpan modules without cpan sudo (into my $HOME directory).

        You're still messing with the system Perl by overriding which modules get loaded by Perl-based applications. Now, that risk isn't large, because very little actually uses the system Perl. But if you wanted to go the safe route, that would be to install your own Perl. This also have some major benefits: Control over the version of Perl, and the ability to upgrade Perl without breaking anything. As a big-time Perl user, these features should be appealing to you.

      Some meditative retreats might be helpful now.

      Best regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

      Furthermore I consider that Donald Trump must be impeached as soon as possible

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1193036]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-26 00:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found