Do I have two versions of perl?

Evidently. You did say you installed one of them yourself.

Has DateTime arrived at the right place?

Whichever perl version is invoked when you do this:

sudo perl
is presumably the one that got the DateTime module installed via CPAN.pm -- I'm actually a bit puzzled (maybe I'd be a little worried) if "sudo perl" turned out to be the more recent ActiveState version that you seem to have installed yourself. The current default version of perl that comes with macosx is 5.8.6, as mentioned in a previous reply.

While I'd personally like to upgrade to 5.8.8, it's not that big an issue for me (this is just my own laptop I'm talking about), I'm content with the version the came with this release of macosx (it handles my needs for doing code development), and I'll look forward to having a newer perl with the next OS upgrade.

Contrary to one of the earlier replies, I have no qualms at all about installing modules liberally using the perl 5.8.6 that came with the OS. Adding totally new non-core modules will obviously have no impact on any existing scripts; the risk that upgrades to pre-installed modules might break something is unlikely to the point of being a non-issue (though I seldom find a compelling need to install such upgrades for laptop use).

You should check to make sure that the perl used in your "sudo" environment is the same one you use for normal development and processing. (If you're doing web development with apache on the mac, be sure that apache uses that same version of perl as well.) Use shell interaction to work that out ("find", "locate", "which", "type", "mv", "rm", edit your personal .bashrc if necessary, and so on). Don't use "Finder" for this stuff -- it sucks.

I can't think of any good reason to use two distinct versions on the one machine (it can be done, but the extra complications would be hard to justify). YMMV.

Update: I should also mention that I do a lot of development on my macosx laptop (using 5.8.6) for scripts that are meant for production use on freebsd (which is using 5.8.8 now). So long as the development machine and the production machine have the same non-core modules installed, there has never been any problem with portability.

At worst, I might need to twiddle a path or two in @INC, for modules that I installed as a non-root user on the freebsd system; though it will usually suffice just to make sure my shell PATH and PERLLIB environment variables are properly tailored to each location.


In reply to Re: Lost in Mac OS X by graff
in thread Lost in Mac OS X by Perrmoss

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.