Rest::HtmlVis::Key - Base class for easy-to-use html vis
Version 0.01
All you have to do is to inherit from Rest::HtmlVis::Key and then implement the callback html.
Example:
package Rest::HtmlVis::MyGraph; use parent qw( Rest::HtmlVis::Key ); use YAML::Syck; sub html { my ($self) = @_; local $Data::Dumper::Indent=1; local $Data::Dumper::Quotekeys=0; local $Data::Dumper::Terse=1; local $Data::Dumper::Sortkeys=1; return '<div class="col-lg-12">'.Dump($self->getStruct).'</div>'; }
Return html hash with input structure.
Return env variables.
Return wight on elemnt on html page. Default 1 means in middle;
Number of blocks in row. Max 12. (ala bootstrap)
Default is 12;
Define if element is on new row or is the part of previous row.
Default is 0 - no new row;
Return head of page as HTML string.
Default empty.
Return onload javascript function of onload attr in body. It must ends with ;
Return body part of HTML.
Václav Dovrtěl <vaclav.dovrtel@gmail.com>
Please report any bugs or feature requests to github repository.
Inspired by https://github.com/towhans/hochschober
https://github.com/vasekd/Rest-HtmlVis
Copyright 2015 Vaclav Dovrtel.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Rest::HtmlVis, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Rest::HtmlVis
CPAN shell
perl -MCPAN -e shell install Rest::HtmlVis
For more information on module installation, please visit the detailed CPAN module installation guide.