On 4 Jan 2012, at 19:16, Rippl, Steve wrote:

That fixed it!  Thanks so much!

No worries!

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.

https://gist.github.com/1561803/4976df8b86b06bbdd2748eab9fdc783ae7a9df86

something vaguely like that, for example :)

Cheers
t0m


_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to