Rich Williams
2007-06-07 10:27:44 UTC
All,
I had a stray </&> in a %method, and the compiler died ...
Can't use an undefined value as an ARRAY reference at
.../HTML/Mason/Compiler.pm line 566
It's the test which is checking for balanced tags which is failing -
it works fine for top level components, but not for %def or %method,
because comp_with_content_stack is only initialised in
start_component, which (as far as I can tell) isn't called for
sub-components.
The attached patch simply changes the test a little (a similar method
is used elsewhere in Compiler.pm). I've also added two new test cases,
one to catch unbalanced content ending tags in top-level components,
and one to catch them in sub-components.
Hope this helps.
Have fun,
Rich
I had a stray </&> in a %method, and the compiler died ...
Can't use an undefined value as an ARRAY reference at
.../HTML/Mason/Compiler.pm line 566
It's the test which is checking for balanced tags which is failing -
it works fine for top level components, but not for %def or %method,
because comp_with_content_stack is only initialised in
start_component, which (as far as I can tell) isn't called for
sub-components.
The attached patch simply changes the test a little (a similar method
is used elsewhere in Compiler.pm). I've also added two new test cases,
one to catch unbalanced content ending tags in top-level components,
and one to catch them in sub-components.
Hope this helps.
Have fun,
Rich