Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
What's the moral of the story here?

That's a very important question and I suspect you might end up with a hatful of different answers. Here's mine.

You said that the problem occurred after installing a new module via cpanm, which caused a lot of updates and that you are running with /usr/bin/perl on Centos 6. This means that you are using modules installed directly from CPAN via an automated installer (cpanm in this case) with the system perl. I'd say that the moral here is not to do that.

CentOS 6 has packages for both JSON and JSON::XS available via yum. It's therefore absolutely fine to use these with the system perl. However, as soon as you go monkeying around with non-packaged modules all bets are off.

Many monks here will contend that you should not use the system perl for any userspace applications at all and instead install your own perl from source, keeping the two perls entirely separate. This approach has its merits.

I'm an old hand and am (mostly) happy enough to use the system perl for my tasks but I am very careful not to pollute it with conflicting modules or to install newer versions of packaged modules into the system tree. Usually I will install modules by hand rather than use cpan/cpanplus/cpanm so I can see exactly what is happening at each step and even decide for myself which depedencies need updating, etc. On those rare occasions when using an automated installer is worth it I will ensure that the target directory of the installs is not into a system tree but into a user-controlled tree and so will no affect any OS use of the system perl and would be much simpler to back out if required.

So for me the moral is: don't mix the system perl with user-installed modules unless you are very, very sure you know what you are doing. If in doubt, install your own perl which you can mess up without banjaxing your system.

In reply to Re^2: Did the JSON module change? by hippo
in thread Did the JSON module change? by nilesOien

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others meditating upon the Monastery: (6)
    As of 2020-02-19 10:50 GMT
    Find Nodes?
      Voting Booth?
      What numbers are you going to focus on primarily in 2020?

      Results (81 votes). Check out past polls.