The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

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

VERSION

version 0.005

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) 2013 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.