in reply to Find version of a module included in perl core

Are you rewriting the corelist commandline tool that comes with Module::CoreList for any particular reason?
$ corelist File::Spec File::Spec was first released with perl 5.005 $ corelist File::Spec 0.83 File::Spec 0.83 was released with perl 5.007003 $ corelist File::Spec 0.89 File::Spec 0.89 was not in CORE (or so I think) $ corelist File::Spec::Aliens File::Spec::Aliens was not in CORE (or so I think)

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^2: Find version of a module included in perl core
by xdg (Monsignor) on Aug 18, 2005 at 16:23 UTC

    Yes, though I'd forgotten about corelist as I'd stopped using it. I wrote a more specialized version because I'm interested in the history of the module, not when it was first released, and then only for particular versions of perl that I might be targeting. (I actually use a variant to spit out my "require" lines for Build.PL with comments about when various versions became available.) Using 'corelist -a File::Spec' to give the full history is another option of course. E.g. (and note the "off-by-one" bug):

    $ corelist -a File::Spec File::Spec was first released with perl 5.005 5.00405 0.6 5.005 0.6 5.00503 0.6 5.00504 0.8 5.006 0.8 5.006001 0.82 5.006002 0.86 5.007003 0.83 5.008 0.83 5.008001 0.86 5.008002 0.86 5.008003 0.87 5.008004 0.87 5.008005 0.87 5.008006 3.01 5.008007 3.05 5.009 0.86 5.009001 0.87 5.009002 3.05 $ ./coremodule-history.pl File::Spec File::Spec version(s): 0.6 in perl 5.00405 0.8 in perl 5.00504 0.86 in perl 5.006002 3.05 in perl 5.008007

    The other thing is that corelist only shows where a module was included and had a version, and not all core modules had versions until recently. My snippet handles that.

    $ corelist -a Test::Simple Test::Simple was first released with perl 5.007003 5.006002 0.47 5.007003 0.41 5.008 0.45 5.008001 0.47 5.008002 0.47 5.008003 0.47 5.008004 0.47 5.008005 0.47 5.008006 0.47 5.008007 0.54 5.009 0.47 5.009001 0.47 5.009002 0.54 $ ./coremodule-history.pl Test::Simple Test::Simple version(s): unknown version in perl 5.00405 unknown version in perl 5.00504 0.47 in perl 5.006002 0.54 in perl 5.008007

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.