NAME

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

VERSION

version 0.007

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.

PERL VERSION

This library should run on perls released even a long time ago. It should work on any version of perl released in the last five years.

Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl.

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 <cpan@semiotic.systems>

COPYRIGHT AND LICENSE

This software is copyright (c) 2022 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.