mikeraz has asked for the wisdom of the Perl Monks concerning the following question:

I'm preparing a little program for release to other people. As part of the code clean up all calls to die are being replaced by calls to croak. This lead me to question whether I can expect systems to have carp installed, Which lead me to Perl Monks to do some searching on the history of carp. Which lead to this node. Which is full of broken links.

Testing at work shows that carp was included in v5.6.1, at least as Sun packeged it up for Solaris. Perldoc indicates that v5.8 has carp included as a core module.

My base question: what should X.Y be in the statement , "If you are using Perl vX.Y or earlier you'll need to fetch Carp from CPAN."

My meta question: where can one find a timeline with a history of core modules? perlhist of perldoc.perl.org, for instance, does not even list carp. Neither does the Perl Timeline page. Does one need to drill down through the delta pages?

Be Appropriate && Follow Your Curiosity

Replies are listed 'Best First'.
Re: Module History, core modules, Carp
by Corion (Patriarch) on Feb 21, 2006 at 20:13 UTC

    It seems to me that you want Module::CoreList, which tells you which module is in the core and also the Perl version to it.

    Running the following gives me 5.00307, which would mean that any "recent" ten year old version of Perl has it.

    C:\>perl -MModule::CoreList -e "print Module::CoreList->first_release( +'Carp')" 5.00307
      Hi :) If you have the latest Module::CoreList, you should have seen
      C:\>corelist Carp Carp was first released with perl 5

      MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
      I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
      ** The third rule of perl club is a statement of fact: pod is sexy.

      That would do it. thank you.

      Be Appropriate && Follow Your Curiosity
Re: Module History, core modules, Carp
by davidrw (Prior) on Feb 21, 2006 at 20:37 UTC
    Module::CoreList looks neat .. you can also browse the perl distributions on cpan -- start at the newer end with http://search.cpan.org/~nwclark/perl-5.8.8/ and use the 'Other Releases' drop box to go back in time and see which distros include Carp (you can see it there in perl5.003_07 just like Module::CoreList says).. You use this techinique w/any distro, too.
Re: Module History, core modules, Carp
by brian_d_foy (Abbot) on Feb 22, 2006 at 04:13 UTC

    I use my perlbrowser application do look at this sort of stuff. It gives me lots of handy module info, including the core version histories for modules. It could be a lot cooler, but it does what I want so I'm not very motivated to change it. :)

    Hmmm... it looks like I never put it on CPAN, but you can get it off of Sourceforge

    --
    brian d foy <brian@stonehenge.com>
    Subscribe to The Perl Review