Ricardo SIGNES > HTML-MasonX-Free-0.003 > HTML::MasonX::Free::Compiler

Download:
HTML-MasonX-Free-0.003.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.003   Source   Latest Release: HTML-MasonX-Free-0.005

NAME ^

HTML::MasonX::Free::Compiler - an HTML::Mason compiler that can reject more input

VERSION ^

version 0.003

OVERVIEW ^

This is an alternate compiler for HTML::Mason. It's meant to fill in for the default, HTML::Mason::Compiler::ToObject. (Don't trust things telling you that the default is HTML::Mason::Compiler. If you're using Mason, you're almost certainly have ToObject doing the work.)

By default, it should behave just like the normal compiler, but more options can be provided to make it stricter.

Right now, there's just one extra option, but there will be more.

ATTRIBUTES ^

allow_stray_content

If false, any text outside of a block (like a method or doc block), other than blank lines, will be fatal. Similar, any Perl lines other than comments will be fatal.

default_method_to_call

If set, this is the name of a method that will be dropped in place whenever the user is trying to call a component without a method. For example, if you set it to "main" then this:

  <& /foo/bar &>

...will be treated like this:

  <& /foo/bar:main  &>

To keep this consistent with the top-level called performed by the mason interpreter, you should probably also use HTML::MasonX::Free::Component as your component class.

AUTHOR ^

Ricardo Signes <rjbs@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2012 by Ricardo Signes.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: