[Catalyst] Moose attributes not initializing when including
FormHandler form
Rippl, Steve
rippls at woodlandschools.org
Wed Jan 4 17:17:34 GMT 2012
On Wed, Jan 4, 2012 at 2:51 AM, Tomas Doran <bobtfish at bobtfish.net> wrote:
> 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..
>
>
Yeah, guilty!
> 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
>
Thanks for the offer of help! Here's the error message and Stack Trace
(excuse the html mail, but I'm thinking it makes it easier to read?)...
Caught exception in WsdSis::Controller::Reports->data "Can't use an
undefined value as a HASH reference at
/srv/WsdSis/script/../lib/WsdSis/Model/Categories/CategoryList.pm line
88."
Stack Trace <http://catalyst:3000/sections/48#>
Package
Line
File
WsdSis::Model::Categories::CategoryList
88
/srv/WsdSis/lib/WsdSis/Model/Categories/CategoryList.pm
85: }
86: }
87: * 88: $self->_temp_details->{$category} =3D {* 89:
type_id =3D> $datatype_id,
90: };
91:
WsdSis::Model::Categories 373 /srv/WsdSis/lib/WsdSis/Model/Categories.pm
370: }
371:
372: #$c->log->debug( Dumper(@roles) ) if $c->debug;* 373:
$category_obj =3D
WsdSis::Model::Categories::CategoryList->with_traits(@roles)->new(*
374: ctx =3D> $c,
375: list =3D> $categories,
376: student_data_store =3D> $self->student_data_store,
WsdSis::Model::Categories 134 /srv/WsdSis/lib/WsdSis/Model/Categories.pm
131: );
132: }
133: * 134: when (/ARRAY/) {* 135:
$self->build_from_list(
136: {
137: categories =3D> $categories,
WsdSis::Controller::Reports 624
/srv/WsdSis/lib/WsdSis/Controller/Reports.pm
621: $arg_ref->{view_period} =3D $view_period unless $c->stash->{by_p=
eriod};
622:
623: my $categories =3D $c->model('Categories');* 624:
$categories->build_frame( $arg_ref );* 625:
626: # what if we haven't been passed a report_sections?
627: if ( !$c->stash->{report_sections} ) {
WsdSis::Controller::Sections 349
/srv/WsdSis/lib/WsdSis/Controller/Sections.pm
346:
347: $grade_id =3D 'empty' if ! defined( $grade_id );
348: * 349: $c->forward( '/reports/data', [ { * 350:
report_config =3D>
351: $c->model('ReportConfig')->{dashboard}->{$grade_=
id},
352: one_section =3D> $section_id,
And I think I've posted all the relevant controllers, models and forms
here... http://www.woodlandschools.org/code
Thanks again!
Steve
-- =
Steve Rippl
Technology Director
Woodland Public Schools
360 841 2730
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120104/4f14b=
e04/attachment.htm
More information about the Catalyst
mailing list