HTML::Processor

HTML::Processor Perl module is a HTML template processor.
Download

HTML::Processor Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Paul Schnell
  • Publisher web site:
  • http://search.cpan.org/~pschnell/HTML-Processor-0.2.1/Processor.pm

HTML::Processor Tags


HTML::Processor Description

HTML::Processor Perl module is a HTML template processor. SYNOPSIS-perl use HTML::Processor; $tpl = new HTML::Processor; -or with config options- $tpl = new HTML::Processor ({ debug => "Normal", footprint => 1, clean => 0 }); # data %animals = ( mammals => { types => , count => 120 }, fish => { types => , count => 85 }, reptiles => { types => , count => 25 }, birds => { types => , count => 57 } ); # create parent loop object my $animals = $tpl->new_loop("animals"); foreach my $animal_type( keys %animals){ # add data to the parent loop $animals->array("animal_type", $animal_type); $animals->array("count", $animals{$animal_type}{ count }); # create new nested loop object 'keyed' on # the parent via $animal_type my $types = $tpl->new_loop("types", $animal_type); foreach my $type ( @{ $animals{$animal_type}{types} }){ # populate each 'child' loop $types->array("type", $type); } } # set variables $tpl->variable("what", "ANIMALS"); $tpl->variable("count", 2); # process and print parsed template print $tpl->process("templates/animals.html"); Requirements: · Perl


HTML::Processor Related Software