Hi folks,
Using Cat::Controller::Formbuilder. The background is I have 2 methods
that essentially do the same thing to start with, ie my $form =
$self->formbuilder, which populates the fields from the information in
an .fb file. But I need to override some of the field definitions, so I
list them separately as a series of $form->field( name => 'name', option
=> [EMAIL PROTECTED] ).
Because this is repeated in both of the methods I thought I could/should
factor out the common code to a private sub like this:
$self->_override_field_defs($form);
but it doesn't work. The only way so far to do it is to put $form in the
stash and use $c->forward('_override_field_defs'), then retrieve $form
from the stash in _override_field_defs().
Is this the correct way to call sub-routines, via $c->forward and
$c->stash? I know about TIMTOWTDI but I want to start off with 'best
practice'.
--
Richard Jones
Leeds, UK
mailto:[EMAIL PROTECTED]
_______________________________________________
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/