Subject: | Catalyst::Controller::HTML::FormFu does extends at runtime, therefore attributes do not work in sub classes. |
The source code for Catalyst::Controller::HTML::FormFu has:
extends 'Catalyst::Controller';
which happens at runtime.
Unfortunately, attribute parsing (e.g. sub index : Private) happens at
compile time, and therefore as it currently stands, this breaks anyone
who tries to subclass Catalyst::Controller::HTML::FormFu and add their
own actions to the subclass.
The extends statement needs to be wrapped in a BEGIN {} block to make it
happen at compile time, then everything will work as expected.
This issue is from an actual user problem reported in #catalyst:
12:56 <@t0m> curon3: No, not related. Can you crack open
Catalyst::Controller::HTML::FormFu
12:57 <@t0m> and put a BEGIN {} block around the 'extends' statement.
13:08 < curon3> t0m: thanks, that made it work