A quick and dirty script to interrogate Module::CoreList and find out what version of a module is included in the core for each major version of perl. Good for figuring out Which version to target for module dependencies?
#!/usr/bin/perl use warnings; use strict; use Module::CoreList; # find the highest subversion of perl in a family: e.g. 5.008007 for 5 +.008 sub highest_subversion { my ($perl_version, $module) = @_; # find the highest perl release for this version of perl return [reverse sort @{$Module::CoreList::families{$perl_version}} +]->[0]; } # find what version of a module is in a specific version of perl sub core_version { my ($perl_version, $module) = @_; if ( exists $Module::CoreList::version{$perl_version}{$module} ) { return $Module::CoreList::version{$perl_version}{$module}; } else { return; } } # print out the history of when a module was included in various perl +releases sub module_history { my ($module) = @_; my $in_core = Module::CoreList->first_release($module); if ($in_core) { print "$module version(s): \n"; for my $version (qw( 5.004 5.005 5.006 5.008 )) { my $subversion = highest_subversion( $version ); my $core_version = core_version( $subversion, $module); $core_version = "unknown version" unless $core_version; print " $core_version in perl $subversion\n"; } } else { print "$module: never released in core\n" } } module_history(shift @ARGV);

In reply to Find version of a module included in perl core by xdg

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.