|name||The module name. This value is the namespace in the package declaration. Note that the method for retrieving the module name is not fool proof, since a module file can have multiple package declarations. HTML::Perlinfo::Modules grabs the namespace from the first package declaration that it finds.|
|version||The version number. Divines the value of $VERSION.|
|desc||The module description. The description is from the POD. Note that some modules dont have POD (or have POD without a description) and, in such cases, the message No description found will be shown.|
The full path to the module file on disk. Printing out the path is especially useful when you want to learn the locations of duplicate modules.
<B>Note that you can make this path a link.B> This is useful if you want to see the local installation directory of a module in your browser. (From there, you could also look at the contents of the files.) Be aware that this link would only work if you use this module from the command-line and then view the resulting page on the same machine. Hence these local links are not present by default. To learn more about local links, please refer to the HTML documentation.
|core||This column value (either yes or no) will tell you if the module is core. In other words, it will tell you if the module was included in your Perl distribution. If the value is yes, then the module lives in either the installarchlib or the installprivlib directory listed in the config file.|
This parameter acts like a filter and only shows you the modules (more specifically, the package names) you request. So if, for example, you wanted to only show modules in the Net namspace, you would use the show_only parameter. It is probably the most useful option available for the print_modules method. With this option, you can use HTML::Perlinfo::Modules as a search engine tool for your local Perl modules. Observe:
show_only => [MYCOMPANY::],
section => My Companys Custom Perl Modules,
show_dir => 1
The example above will print out every module in the MYCOMPANY namespace in the Perl include path (@INC). The list will be entitled My Companys Custom Perl Modules and because show_dir is set to 1, the list will only show the directories in which these modules were found along with how many are present in each directory.
You can add namespaces to the array reference:
show_only => [MYCOMPANY::, Apache::],
section => My Companys Custom Perl Modules & Apache Modules,
show_dir => 1
In addition to an array reference, show_only also accepts the word core, a value that will show you all of the core Perl modules (in the installarchlib and installprivlib directories from the config file).
Whenever you perform a module search, you will see a summary of your search that includes the directories searched and the number of modules found. Whether or not your search encompasses the Perl include path (@INC), you will still see these directories, along with any other directories that were actually searched. If you do not what to see this search summary, you must set show_inc to 0. The default value is 1.
The default value is 0. Setting this parameter to 1 will only show you the directories in which your modules were found (along with a summary of how many were found, etc). If you do not want to show a search summary, then you must use the show_inc parameter.
This parameter allows you to highlight modules with different colors. Highlighting specific modules is a good way to draw attention to them.
The parameter value must be an array reference containing at least 2 elements. The first element is the color itself which can be either a hex code like #FFD700 or the name of the color. The second element specifies the module(s) to color. And the third, optional element, in the array reference acts as a label in the color code section. This final element can even be a link if you so desire.
color => [red, Apache::],
color => [#FFD700, CGI::]
Alternatively, you can also change the color of the rows, by setting CSS values in the constructor. For example:
$m = HTML::Perlinfo::Modules->new(
leftcol_bgcolor => red,
rightcol_bgcolor => red
show_only => CGI::,
show_inc => 0
# This next example does the same thing, but uses the color parameter in the print_modules method
$m = HTML::Perlinfo::Modules->new();
show_only => [CGI::],
color => [red, CGI::],
show_inc => 0
The above example will yield the same HTML results. So which approach should you use? The CSS approach gives you greater control of the HTML presentation. The color parameter, on the other hand, only affects the row colors in the modules list. You cannot achieve that same effect using CSS. For example:
$m->print_modules( color => [red, CGI::], color => [red, Apache::] );
For further information on customizing the HTML, including setting CSS values, please refer to the HTML documentation.
The section parameter lets you put a heading above the module list. Example:
show_only => [Apache::],
section => Apache/mod_perl modules,
show_dir => 1,
Do you want only a fragment of HTML and not a page with body tags (among other things)? Then the full_page option is what you need to use (or a regular expression, as explained in the HTML documentation). This option allows you to add your own header/footer if you so desire. By default, the value is 1. Set it to 0 to output the HTML report with as little HTML as possible.
$m = HTML::Perlinfo::Modules->new( full_page => 0 );
# You will still get an HTML page but without CSS settings or body tags
$m->print_modules( full_page => 1 ); # Now you will get the complete, default HTML page.
Note that the full_page option can be set in either the constructor or the method call. The advantage of setting it in the constructor is that every subsequent method call will have this attribute. (There is no limit to how many times you can call print_modules in a program. If calling the method more than once makes no sense to you, then you need to look at the show_only and from options.) If you set the full_page in the print_modules method, you will override its value in the object.
By default, every module is linked to its documentation on search.cpan.org. However some modules, such as custom modules, would not be in CPAN and their link would not show any documentation. With the link parameter you can override the CPAN link with you own URL.
The parameter value must be an array reference containing two elements. The first element can either be a string specifying the module(s) to link or an array reference containing strings or the word all which will link all the modules in the list. The second element is the root URL. In the link, the module name will come after the URL. So in the example below, the link for the Apache::Status module would be http://www.myexample.com/perldoc/Apache::Status.
link => [Apache::, http://www.myexample.com/perldoc/]
# Another example
my $module = HTML::Perlinfo::Modules
->print_modules( show_only => [CGI::,File::,HTML::],
link => [HTML::, http://www.html-example.com/perldoc/],
link => [[CGI::,File::], http://www.examples.com/perldoc/] );
Further information about linking is in the HTML documentation.
HTML::Perlinfo::Modules uses the same HTML generation as its parent module, HTML::Perlinfo.
(Note that you can also highlight certain modules with the color parameter to print_modules.)
For further details and examples, please see the HTML documentation in the HTML::Perlinfo distribution.
Please report any bugs or feature requests to firstname.lastname@example.org, or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTML-Perlinfo>. I will be notified, and then youll automatically be notified of progress on your bug as I make changes.
If you decide to use this module in a CGI script, make sure you print out the content-type header beforehand.
HTML::Perlinfo::Loaded, HTML::Perlinfo, perlinfo, Module::Info, Module::CoreList.
Mike Accardo <email@example.com>
Copyright (c) 2006-8, Mike Accardo. All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the terms of the Perl Artistic License.
|perl v5.20.3||HTML::PERLINFO::MODULES (3)||2015-06-08|