ActiveState::ModInfo - Queries about installed perl modules
use ActiveState::ModInfo qw(list_modules find_module);
The following functions are provided:
Returns the full path to the given $fname, or undef
if not found.
Returns the full path to the given module, or undef
if not found.
Will for instance change "html::parser" into "HTML::Parser". If multiple mappings are possible return $mod unchanged. The $mod is also returned unchanged if the module can't be located.
The following options are recognized:
inc
=> \@listA list of directories to search for modules. If not provided it defaults to all the @INC.
prefix_only
=> $boolIf true assume $mod to just be a namespace. Will just look for matching directory names, not an actual .pm file.
Convert an fname to a module module name. The function might return
undef
if the given $fname does not represent a perl module.
This function will locate all modules (.pm files) and return a list of module-name/file-location pairs.
The following options are recognized:
inc
=> \@listA list of directories to search for modules. If not provided it defaults to all the @INC entries that point inside the perl installation directory ($Config{prefix}).
maxdepth
=> $nWhen to give up when traversing directories, i.e. how many "::"s to allow in the module name. The default is 6. A value of 0 indicate no limit.
allowdup
=> $boolIf true return all occurrences or any given module. If this option is
false or not provided, only the first occurrence of any given module
when traversing inc
will be returned. This should also be the
module that perl would pick up if @INC as the given inc
.
namespace
=> $nsOnly modules in the given namespace is returned. If $ns ends with "::" only submodules of the given namespace is returned.
Convert a module name to an fname.
Returns an opened file handle for the given fname, or undef
if not
found. Slightly more efficient than using the standard open()
function on the path returned by find_inc()
, but otherwise just the
same. The file is opened in read-only mode.
Returns an opened file handle for the given module, or undef
if not found.
Return the $VERSION of a module using the official ExtUtils::MakeMaker
algorithm. This is a slightly modified copy of the MakeMaker
function. The main difference is that it returns a real undef
if
no version number is found and do it without producing any warning.
Return the module name and its version number from a file.
none.