This function generates a listing of the contents of part of the module
namespace. The part of the namespace under the module name prefix PREFIX
is examined, and information about it returned as specified by OPTIONS.
Module names are handled by this function in standard bareword syntax.
They are always fully-qualified; isolated name components are never used.
A module name prefix is the part of a module name that comes before
a component of the name, and so either ends with :: or is the empty
OPTIONS is a reference to a hash, the elements of which specify what is
to be returned. The options are:
Truth value, default false. If true, return names of modules in the relevant
part of the namespace.
Truth value, default false. If true, return module name prefixes in the
relevant part of the namespace. Note that prefixes are returned if the
corresponding directory exists, even if there is nothing in it.
Truth value, default false. If true, return names of POD documentation
files that are in the module namespace.
Truth value, default false. If false, only valid bareword names are
permitted. If true, bareword syntax is ignored, and any ::-separated
name that can be turned into a correct filename by interpreting name
components as filename components is permitted. This is of no use in
listing actual Perl modules, because the illegal names cant be used in
Perl, but some programs such as <B>perldocB> use a ::-separated name for
the sake of appearance without really using bareword syntax. The loosened
syntax applies both to the names returned and to the PREFIX parameter.
Precisely, the trivial syntax is that each ::-separated component
cannot be . or .., cannot contain :: or /, and (except for the
final component of a leaf name) cannot end with :. This is precisely
what is required to achieve a unique interconvertible ::-separated path
syntax on Unix. This criterion might change in the future on non-Unix
systems, where the filename syntax differs.
Truth value, default false. If false, only names at the next level down
from PREFIX (having one more component) are returned. If true, names
at all lower levels are returned.
Truth value, default false. If false, POD documentation files are
expected to be in the same directory that the corresponding module file
would be in. If true, POD files may also be in a subdirectory of that
named "pod. (Any POD files in such a subdirectory will therefore be
visible under two module names, one treating the pod" subdirectory
level as part of the module name.)
Note that the default behaviour, if an empty options hash is supplied, is
to return nothing. You must specify what kind of information you want.
The function returns a reference to a hash, the keys of which are the
names of interest. The value associated with each of these keys is undef.