Text::MicroMason::HTMLMason

Text::MicroMason::HTMLMason is a simple compiler for Mason-style Templating.
Download

Text::MicroMason::HTMLMason Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Matthew Simon Cavalletto
  • Publisher web site:
  • http://search.cpan.org/~ferrency/

Text::MicroMason::HTMLMason Tags


Text::MicroMason::HTMLMason Description

Text::MicroMason::HTMLMason is a simple compiler for Mason-style Templating. Text::MicroMason::HTMLMason is a simple compiler for Mason-style Templating.SYNOPSISCreate a MicroMason object to interpret the templates: use Text::MicroMason; my $mason = Text::MicroMason->new();Use the standard compile and execute methods to parse and evalute templates: print $mason->compile( text=>$template )->( @%args ); print $mason->execute( text=>$template, @args );Mason syntax provides several ways to mix Perl into a text template: < %args > $name < /%args > % if ( $name eq 'Dave' ) { I'm sorry < % $name % >, I'm afraid I can't do that right now. % } else { < %perl > my $hour = (localtime); my $daypart = ( $hour > 11 ) ? 'afternoon' : 'morning'; < /%perl > Good < % $daypart % >, < % $name % >! % } < & "includes/standard_footer.msn" & > < %doc >Here's a private developr comment describing this template. < /%doc >Here are some key features of "Text MicroMason HTMLMason":· Template interpolation with · Literal Perl lines with leading %· Named %args, %perl, %once, %init, %cleanup, and %doc blocks· The $m mason object, although with many fewer methods· Expression filtering with |h and |u (via -Filter mixin)Requirements:· Perl


Text::MicroMason::HTMLMason Related Software