05 Sep 2001 20:13:27 UTC
- Distribution: Module-MetaInfo
- Module version: 0.03
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (2)
- Testers (187 / 317 / 0)
- KwaliteeBus factor: 0
- 79.21% Coverage
- License: unknown
- Download (173.15KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
- IMPLEMENTATION AND INHERITANCE..
- Module::MetaInfo::new(<dist_filename> [<modlist_filename>)
- $thing->::verbose() $thing->::scratch_dir()
- description / docs / etc...
- RETURN CONVENTIONS
- FUTURE FUNCTIONS
- SEE ALSO
Module::MetaInfo - Report meta information from perl module distribution files
use Module::MetaInfo.pm; $mod=new Module::MetaInfo(perl-module-file.tar.gz); $desc=$mod->description();
This module is designed to provide the primary interface to Perl meta information for perl module distribution files (this, however, is a prototype and hasn't yet been accepted by the "perl community", so don't count on it yet). The module is designed to allow perl modules to be easily and accurately packaged by other package systems such as RPM and DPKG.
Module::MetaInfomodule isn't actually designed to get any meta information from the perl module. Instead it serves as an entry point to other modules which have their own way of doing that. Since there isn't yet any agreed way to store meta-information in perl modules this may not be very reliable.
Currently there are two ways of getting meta information: a) guessing from the contents of the module and b) using a directory structure which has not yet been accepted by the perl community. The default way this module works is to first try b) then try a) then to give up.
This module doesn't inherit anything. Instead it simply uses three different classes
Module::MetaInfo::ModList, first trying functions from AutoGuess then from BestGuess and finally from ModList.
new creates the object and initialises it. The argument is the path of the perl module distribution file.
If you provide the perl modules list then meta information from the modules list will be available.
These functions affect class settings (or if called for an object, only the settings of the object: afterwards that object will ignore changes to the class settings).
Currently implemented are verbose which prints debugging info and scratch_dir which sets the directory to be used for unpacking perl modules.
These functions provide meta information. They are provided by the base classes. In all cases the functions will return
undefif they are unable to get meta information of that kind. If there is no function then MetaInfo will die (croak). If you want to work with different versions of MetaInfo that may implement different sets of functions then use
evalto catch the
For more information about the different functions available, see the subsidiary packages such as
N.B. we will throw an exception if you call a function which isn't provided by any of the modules. This is important since some functions are only present if a modules list has been provided to new. Either don't call those functions unless you have provided the modules list or catch the exception.
Meta information function either return a scalar (name / description) or an array value. If an array is returned, it will actually be returned as a reference to an array if the function is used in a scalar context.
Module::MetaInfo.pmthe scalar return is always used so any modules used by it must provide this mode.
There are a number of other things which should be implemented. These can be guessed from looking at the possible meta-information which can be stored in the RPM or DPG formats, for example. Examples include:
copyright - GPL / as perl / redistributable / etc.
application area - Database / Internet / WWW / HTTP etc.
suggests - related applications
In many cases this data is generated currently by package building tools simply by using a fixed string. The function should do better than that in almost all cases or else it is't worth having...
You may distribute under the terms of either the GNU General Public License, version 2 or (at your option) later or the Artistic License, as specified in the Perl README.
Please see bugs in sub modules. Especially warnings in
Michael De La Rue.
Module Install Instructions
To install Module::MetaInfo, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Module::MetaInfo
For more information on module installation, please visit the detailed CPAN module installation guide.
|s||Focus search bar|
|?||Bring up this help dialog|
|g p||Go to pull requests|
|g i||go to github issues (only if github is preferred repository)|
|g a||Go to author|
|g c||Go to changes|
|g i||Go to issues|
|g d||Go to dist|
|g r||Go to repository/SCM|
|g s||Go to source|
|g b||Go to file browse|