NAME
App::ZofCMS::Plugin::InstalledModuleChecker - utility plugin to check for installed modules on the server
SYNOPSIS
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>
DESCRIPTION
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
FIRST-LEVEL ZofCMS TEMPLATE AND MAIN CONFIG FILE KEYS
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".
OUTPUT
<ul>
<tmpl_loop name='plug_installed_module_checker'>
<li>
<tmpl_var escape='html' name='info'>
</li>
</tmpl_loop>
</ul>
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.
REPOSITORY
Fork this module on GitHub: https://github.com/zoffixznet/App-ZofCMS
BUGS
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
AUTHOR
Zoffix Znet <zoffix at cpan.org> (http://zoffix.com/, http://haslayout.net/)
LICENSE
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.