[% setvar title Detecting Perl Core Modules Should Be Easy %]

This file is part of the Perl 6 Archive

Note: these documents may be out of date. Do not use as reference!

To see what is currently happening visit http://www.perl6.org/


Detecting Perl Core Modules Should Be Easy


  Maintainer: Leon Brocard <acme@astray.com>
  Date: 25 Sep 2000
  Mailing List: perl6-stdlib@perl.org
  Number: 291
  Version: 1
  Status: Developing


In Perl6 it should be easy to see to check whether any particular module comes from the Perl core or not.


Randy J. Ray or Tim Bunce mentions the following in the Devel::Modlist documentation:

"Suppress the display of those modules that are a part of the Perl core. This is dependent on the Perl private library area not being an exact substring of the site-dependent library. The build process checks this for you prior to install."

I'd suggest that just like the version of a module being useful, and hence available as, say $Devel::Modlist::VERSION, the fact that a module is currently in the Perl core is an important fact to know and should be available as, perhaps: $Devel::Modlist::CORE.

The actual name chosen, or even the way this is done, is open to discussion.

This feature will be useful for quite a number of uses, including doing lots of meta-module stuff like Devel::Modlist.


If followed as above, we would simply have the package variable $CORE set to be true in all modules in the Perl standard library.

Converting perl5 to perl6 would have to make sure that any $CORE variables need to be translated to another name.