|INFO_GENERAL||The Perl version, build date, and more.|
|INFO_VARIABLES||Shows all predefined variables from EGPCS (Environment, GET, POST, Cookie, Server).|
|INFO_CONFIG||All configuration values from config_sh. INFO_ALL shows only some values.|
|INFO_APACHE||Apache HTTP server information, including mod_perl information.|
|INFO_MODULES||All installed modules, their version number and description. INFO_ALL shows only core modules. Please also see HTML::Perlinfo::Modules.|
|INFO_LOADED||Post-execution dump of loaded modules (plus INFO_VARIABLES). INFO_ALL shows only core modules. Please also see HTML::Perlinfo::Loaded.|
|INFO_LICENSE||Perl license information.|
|INFO_ALL||Shows all of the above defaults. This is the default value.|
There are two styles of programming with Perlinfo.pm, a function-oriented style and an object-oriented style.
$p = new HTML::Perlinfo; $p->info_all; # You can also set the CSS values in the constructor! $p = HTML::Perlinfo->new( bg_image => http://i104.photobucket.com/albums/m176/perlinfo/camel.gif, bg_repeat => yes-repeat ); $p->info_all;
More examples ...
# This is wrong (no capitals) $p->INFO_MODULES; # But this is correct perlinfo(INFO_MODULES); # Ditto $p->info_modules;
You can capture the HTML output and manipulate it or you can alter CSS elements with object attributes.
For further details and examples, please see the HTML documentation in the HTML::Perlinfo distribution.
Displaying detailed server information on the internet is not a good idea and HTML::Perlinfo reveals a lot of information about the local environment. While restricting what system users can publish online is wise, you can also hinder them from using the module by installing it outside of the usual module directories (see perldoc -q lib). Of course, preventing users from installing the module in their own home directories is another matter entirely.
HTML::Perlinfo does not require any non-core modules. There are no requirements, except Perl version 5.6 and above.
1. Print the content-type header first if you are using the module in a CGI setting. (mod_perl handles this for you automatically.) If you do not print the header, you will produce an internal server error. Of course, you can forgo a Web server entirely and use the module at the command-line. Please see the perlinfo tool included in this distribution.
2. If the HTML takes too long to load in the browser, then you can try flushing the output buffer. By flushing the buffer, the HTML will start appearing immediately.
INFO_APACHE relies soley on environment variables. If you dont use Apache, there is nothing to worry about. You do not need to turn INFO_APACHE off or anything. The section will simply not appear. Any Web server information will still be in the environment variables, unless you configure your server to not report information.
INFO_VARIABLES did not work correctly until version 1.52.
INFO_LOADED is the only option whose output cannot be assigned to a scalar.
Since the module outputs HTML, you may want to use it in a CGI script, but you do not have to. Of course, some information, like HTTP headers, would not be available if you use the module at the command-line. If you decide to use this module in a CGI script, <B>make sure you print out the content-type header beforehandB>. For example:
use HTML::Perlinfo; print "Content-type: text/html\n\n"; perlinfo();
I prefer to use the header function from the CGI module:
HTML::Perlinfo stopped printing the header automatically as of version 1.43.
By flushing the output buffer, you can make the HTML appear immediately. If your program is running slow, then you can try flushing the buffer.
In this example, I am flushing the buffer because I know that there will be a lot of modules:
Some might notice that HTML::Perlinfo shares the look and feel of the PHP function phpinfo. It was originally inspired by that function and was first released in 2004 as PHP::Perlinfo, which is no longer available on CPAN.
If youd like to report an issue you can use githubs issue tracker <https://github.com/mixedconnections/HTML-Perlinfo/issues>.
Config. You can also use perl -V to see a configuration summary at the command-line.
Mike Accardo <firstname.lastname@example.org>
Copyright (c) 2004-9, 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 (3)||2015-06-12|