NAME
Lib::Module.pm - Perl library module utilities.
SYNOPSIS
use Lib::Module;
my $m = new Lib::Module; # Create a module object.
# Create the class library hierarchy.
$m -> libdirs ($verbose);
$m -> module_paths ($verbose);
$m -> scanlibs ($verbose);
# Retrieve the module object for a package.
my $m2 = $m -> retrieve ("Tk::Browser");
print $m2 -> PathName . "\n" .
$m2 -> BaseName . "\n" .
$m2 -> PackageName . "\n" .
$m2 -> ModuleVersion . "\n" .
$m2 -> Supers . "\n";
# Return the file path name of a module.
my $path = $m -> pathname ("Tk::Browser");
DESCRIPTION
A Lib::Module object describes a Perl library module and includes the module's package name, file name, version, and superclasses, if any.
The module objects are normally part of a class hierarchy generated by libdirs (), module_paths (), and scanlibs (). Every module is a subclass of UNIVERSAL, Perl's default superclass.
METHODS
ModuleVersion
Return the module's b<$VERSION => line.
PathName ($name)
Return the module's path.
BaseName ($name)
Return the module's file basename.
PackageName ($name)
Return the argument of the module's package function.
retrieve (basename || packagename)
The retrieve ($name) method returns the Lib::Module object or undef.
my $new = $m -> retrieve ("Optional::Module");
if (!defined $new) {
print "Can't find Optional::Module.\n"
}
Retrieve matches the first part of the module's name. If retrieve doesn't match a sub-module, specify only the sub-module's name; e.g., 'Module' instead of 'Optional::Module'.
Supers ()
Returns the module's superclasses; i.e, the arguments of an @ISA declaration.
EXPORTS
See the @EXPORTS_OK array.
BUGS
Does not take into account all of the possible module naming schemes when retrieving modules.
VERSION
VERSION 0.69
COPYRIGHT
Copyright © 2001-2004 Robert Kiesling, rkies@cpan.org.
Licensed under the same terms as Perl. Refer to the file, "Artistic," for information.
SEE ALSO
perl(1), Tk::Browser(3)
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 112:
Non-ASCII character seen before =encoding in '©'. Assuming CP1252