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");
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.
Return the module's b<$VERSION => line.
Return the module's path.
Return the module's file basename.
Return the argument of the module's package function.
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'.
Returns the module's superclasses; i.e, the arguments of an @ISA declaration.
See the @EXPORTS_OK array.
Does not take into account all of the possible module naming schemes when retrieving modules.
VERSION 0.69
Copyright © 2001-2004 Robert Kiesling, rkies@cpan.org.
Licensed under the same terms as Perl. Refer to the file, "Artistic," for information.
perl(1), Tk::Browser(3)
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '©'. Assuming CP1252
To install Lib::Module, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lib::Module
CPAN shell
perl -MCPAN -e shell install Lib::Module
For more information on module installation, please visit the detailed CPAN module installation guide.