Blatte::Compiler

Blatte::Compiler is a Perl module to compile a Blatte document into Perl.
Download

Blatte::Compiler Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Bob Glickstein
  • Publisher web site:
  • http://search.cpan.org/~bobg/HTML-LoL-1.3/lib/HTML/LoL.pm

Blatte::Compiler Tags


Blatte::Compiler Description

Blatte::Compiler is a Perl module to compile a Blatte document into Perl. Blatte::Compiler is a Perl module to compile a Blatte document into Perl.SYNOPSIS use Blatte::Compiler; &Blatte::Compiler::compile($file_handle, &callback); &Blatte::Compiler::compile_sparse($file_handle, &callback); sub callback { my($val, $src) = @_; if (defined($src)) { ...Blatte expression... } else { ...plain text... } }This is a convenient interface for parsing a file full of Blatte code. A file handle and a callback are passed to compile() or compile_sparse() (see below for the difference between the two). The callback is then invoked for each top-level item parsed from the input.The compile() function treats its entire input as a sequence of Blatte expressions, including plain text at the top level, which is divided up into Blatte "words," each of which is one Blatte expression. The callback is called once for each expression, with two arguments: the Perl string resulting from parsing the Blatte expression; and the Blatte source string itself.The compile_sparse() function works the same way, except that plain text at the top-level of the input is not divided into words. Only Blatte expressions beginning with a Blatte metacharacter are parsed as described above. All text in between such expressions is passed as a single string to the callback, with no second argument. Requirements: · Perl


Blatte::Compiler Related Software