Template::Ast

Template::Ast is a Perl module to process ASTs for Perl Template Toolkit.
Download

Template::Ast Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Agent Zhang
  • Publisher web site:
  • http://search.cpan.org/~agent/OpenResty-0.3.14/lib/OpenResty/Spec/Overview.pod

Template::Ast Tags


Template::Ast Description

Template::Ast is a Perl module to process ASTs for Perl Template Toolkit. Template::Ast is a Perl module to process ASTs for Perl Template Toolkit.SYNOPSIS use Template::Ast; # Rebuild AST stored in file: $ast = Template::Ast->read('foo.ast') or die Template::Ast->error(); # Writing existing AST to file: $ast = { Marry => , John => }; Template::Ast->write($ast, 'foo.ast') or die Template::Ast->error(); $ast = Template::Ast->merge(, undef); # $ast = Template::Ast->merge(undef, ); # $ast = Template::Ast->merge(undef, undef); # undef $ast = Template::Ast->merge({A=>1,B=>2}, ); # $ast = Template::Ast->merge(, ); # $ast = Template::Ast->merge(, 5); # 5 $ast = Template::Ast->merge({A=>1,B=>2}, {C=>3}); # {A=>1,B=>2,C=>3} $ast = Template::Ast->merge({A=>1,B=>2}, {B=>3}); # {A=>1,B=>3} # {A=>1,B=>2} $ast = Template::Ast->merge({A=>1,B=>undef}, {A=>undef,B=>2}); Template::Ast->merge( {A=>1,B=>{C=>1,D=>2}}, {B=>{C=>1,D=>3,E=>4}} ); # {A=>1,B=>{C=>1,D=>3,E=>4}} Template::Ast->merge( {A=>1,B=>{C=>}}, {B=>{C=>}} ); # {A=>1,B=>{C=>}} print Template::Ast->dump(, );ASTs are essential in the programming model based on Perl Template Toolkit. This module provides some easy interface to do the dirty work involved in AST handling. The term AST used here are referred to any Perl referece pointed to a complex data structure, such as a nested hash, a nested array, or such. Requirements: · Perl


Template::Ast Related Software