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.

AUTHOR

'Zoffix, <'zoffix at cpan.org'> (http://haslayout.net/, http://zoffix.com/, http://zofdesign.com/)

BUGS

Please report any bugs or feature requests to bug-app-zofcms-plugin-installedmodulechecker at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-ZofCMS-Plugin-InstalledModuleChecker. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc App::ZofCMS::Plugin::InstalledModuleChecker

You can also look for information at:

COPYRIGHT & LICENSE

Copyright 2009 'Zoffix, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.