App::ZofCMS::Plugin::InstalledModuleChecker - utility plugin to check for installed modules on the server
In ZofCMS Template or Main Config File:
plugins => [ qw/InstalledModuleChecker/, ], plug_installed_module_checker => [ qw/ Image::Resize Foo::Bar::Baz Carp /, ],
In HTML::Template template:
<ul> <tmpl_loop name='plug_installed_module_checker'> <li> <tmpl_var escape='html' name='info'> </li> </tmpl_loop> </ul>
The module is a utility plugin for App::ZofCMS that provides means to check for whether or not a particular module is installed on the server and get module's version if it is installed.
The idea for this plugin came to me when I was constantly writing "little testing scripts" that would tell me whether or not a particular module was installed on the crappy server that I have to work with all the time.
This documentation assumes you've read App::ZofCMS, App::ZofCMS::Config and App::ZofCMS::Template
plugins
plugins => [ qw/InstalledModuleChecker/, ],
Mandatory. You need to include the plugin in the list of plugins to execute.
plug_installed_module_checker
plug_installed_module_checker => [ qw/ Image::Resize Foo::Bar::Baz Carp /, ],
Mandatory. Takes an arrayref as a value. Can be specified in either ZofCMS Template or Main Config File; if set in both, the value in ZofCMS Template takes precedence. Each element of the arrayref must be a module name that you wish to check for "installedness".
Plugin will set $t->{t}{plug_installed_module_checker} (where $t is ZofCMS Template hashref) to an arrayref of hashrefs; thus, you'd use a <tmpl_loop> to view the info. Each hashref will have only one key - info - with information about whether or not a particular module is installed.
$t->{t}{plug_installed_module_checker}
$t
<tmpl_loop>
info
Fork this module on GitHub: https://github.com/zoffixznet/App-ZofCMS
To report bugs or request features, please use https://github.com/zoffixznet/App-ZofCMS/issues
If you can't access GitHub, you can email your request to bug-App-ZofCMS at rt.cpan.org
bug-App-ZofCMS at rt.cpan.org
Zoffix Znet <zoffix at cpan.org> (http://zoffix.com/, http://haslayout.net/)
You can use and distribute this module under the same terms as Perl itself. See the LICENSE file included in this distribution for complete details.
LICENSE
To install App::ZofCMS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::ZofCMS
CPAN shell
perl -MCPAN -e shell install App::ZofCMS
For more information on module installation, please visit the detailed CPAN module installation guide.