App::Slackeria::Output - XHTML output for App::Slackeria
# $project looks like this: # { # perl => { # Debian => { ok => 1, data => '5.12.3-7' }, # Freshmeat => { ok => 1, data => '5.14.0' }, # }, # irssi => { # Debian => { ok => 1, data => '0.8.15-3+b1' }, # Freshmeat => { ok => 1, data => '0.8.12' }, # }, # } App::Slackeria::Output->write_out( filename => '/tmp/out.html', data => $project );
version 0.12
App::Slackeria::Out::XHTML takes a hashref of projects, which themselves are hashrefs of plugin name => plugin output pairs, and stuffs it into a nicely formatted (X)HTML table.
Creates HTML in filename based on data.
In the outer layer, there are just two loop variables available, headers and projects. Use <TMPL_LOOP headers> ... stuff ... </TMPL_LOOP> to access their content.
<TMPL_LOOP headers> ... stuff ... </TMPL_LOOP>
The headers loop contains the table fields, i.e. the names of the executed plugins in the correct order, in the variable plugin. It can be used like <TMPL_VAR plugin>.
<TMPL_VAR plugin>
projects loops over each project, which in turn loops over each plugin result. It provides the variable project with the current project's name and the loop variable plugins.
plugins provides the following variables:
class
CSS class for plugin result. Either "ok" or "fail".
href
URL to project page for this plugin, if available.
data
plugin's text output
HTML::Template(3pm)
slackeria(1)
Copyright (C) 2011 by Daniel Friesel <derf@finalrewind.org>
0. You just DO WHAT THE FUCK YOU WANT TO.
To install App::Slackeria::Config, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Slackeria::Config
CPAN shell
perl -MCPAN -e shell install App::Slackeria::Config
For more information on module installation, please visit the detailed CPAN module installation guide.