HTML::Macro::Loop - looping construct for repeated HTML blocks
use HTML::Macro; use HTML::Macro::Loop; $htm = HTML::Macro->new(); $loop = $htm->new_loop('loop-body', 'id', 'name', 'phone'); $loop->push_array (1, 'mike', '222-2389'); $loop->push_hash ({ 'id' => 2, 'name' => 'lou', 'phone' => '111-2389'}); $htm->print ('test.html');
HTML::Macro::Loop processes tags like
<loop id="loop-tag"> loop body </loop>
Each loop body is treated as a nested HTML::Macro within which variable substitutions, conditions and nested loops are processed as described under HTML::Macro. For complete documentation see HTML::Macro. =head1 AUTHOR
Michael Sokolov, sokolov@ifactory.com
perl(1).
To install HTML::Macro, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Macro
CPAN shell
perl -MCPAN -e shell install HTML::Macro
For more information on module installation, please visit the detailed CPAN module installation guide.