in reply to Re: Find version of a module included in perl core
in thread Find version of a module included in perl core
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.
|
|---|