Ananke::Template

Front-end module to the Ananke::Template
Download

Ananke::Template Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Udlei D. R. Nattis
  • Publisher web site:
  • http://search.cpan.org/~nattis/

Ananke::Template Tags


Ananke::Template Description

Front-end module to the Ananke::Template Ananke::Template is a Perl module based on Template ToolKit.SYNOPSISTemplate.pl: use Ananke::Template; # Vars my @array; push(@array,{ name => 'Udlei', last => 'Nattis' }); push(@array,{ name => 'Ananke', last => 'IT' }); my $var = { id => 1, title => 'no title', text => 'no text', }; # Template Directory and File my $template_dir = "./"; my $template_file = "template.html"; my $template_vars = { 'hello' => "\nhello world", 'scalar' => $var, 'array' => , 'register' => \@array, }; $template_vars->{SCRIPT_NAME} = "file.pl"; # Method 1 - print # Create template object my $template = new Ananke::Template($template_dir); # Run Template $template->process($template_file,$template_vars); # Method 2 - print &Ananke::Template::view_template($template_dir,$template_file,$template_vars); # Method 3 - write in file &Ananke::Template::view_template($template_dir,$template_file,$template_vars,"/tmp/file.html"); # Method 4 - return to variable my $return = Ananke::Template::view_template($template_dir,$template_file,$template_vars,1); print $return;template.html: ID: Title: Text: value = Nome = , Last = Requirements: · Perl


Ananke::Template Related Software