[Catalyst] Moose attributes not initializing when including
bobtfish at bobtfish.net
Wed Jan 4 20:11:44 GMT 2012
On 4 Jan 2012, at 19:16, Rippl, Steve wrote:
> That fixed it! Thanks so much!
> I'll set about re-factoring to try and stop passing the context
> object about so freely! I have to say this was my first app using
> catalyst that started a few years ago and has grown in a fairly
> haphazard way as I've learnt more, and more has been demanded/asked
> for from the app by the end users. Kudos to you guys for creating
> this awesome framework that has allowed me to stumble along and
> already successfully rewrite major portions of it without having to
> tear the entire thing down each time!
Generally the nicer way to do this is to split things into two
packages, making the MyApp::Model::XXX class use
Component::InstancePerContext, grabbing the parts needed from $ctx and
passing them explicitly into the other package.
something vaguely like that, for example :)
More information about the Catalyst