HTML::MasonX::Free::Compiler - an HTML::Mason compiler that can reject more input
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.
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.
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.
Ricardo Signes <firstname.lastname@example.org>
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.