[Catalyst] Moose attributes not initializing when including
FormHandler form
Tomas Doran
bobtfish at bobtfish.net
Wed Jan 4 10:51:32 GMT 2012
On 3 Jan 2012, at 23:56, Rippl, Steve wrote:
> I don't know if this is a Moose, FormHandler or Catalyst problem, so
> I'm starting here, hope that's OK!
No worries :)
> So _temp_details has a default which is first called upon in
> _build_details. All this works fine if I comment out the
>
> use WsdSis::Form::LearningPlan::Start;
>
> in WsdSis::Controller::LearningPlan!!
>
Erm, you really haven't shown us enough of the code to help work out
what's going on here - can we have the entire of all the relevant
files attached, and the full error message with Carp::Always loaded?
>
> has 'ctx' => (
> is => 'rw',
> required => 1,
> );
Also, this ^^ assuming that 'ctx' is the Catalyst context, is always
always wrong! You're (at least) leaking the context between requests
here, and probably worse..
> What am I doing wrong? Why isn't $self->_temp_details being
> initialized when I use an HTML::FormHandler form package in a
> different controller?
No idea due to lack of relevant code, sorry!
Cheers
t0m
More information about the Catalyst
mailing list