I'm not sure how I managed to get this far into Handel/Mango Catalyst bits without ever knowing/understanding the magic that is Catalyst::Action.
The requirement was easy: add a :FormFile attribute to the Mango controllers so one could override the default form used with actions like create/edit:
sub edit : Local FormFile('/path/to/form.yml') {
my $form = $self->form;
};sub _parse_FormFile_attr {
my ($self, $c, $name, $value) = @_;
if (my $form = $self->_load_form_from_file($c, $value)) {
return Form => $form;
};
return;
}; if (exists $c->action->attributes->{'Form'}) {
$form = $c->action->attributes->{'Form'}->[-1];
};