[Catalyst] Moose attributes not initializing when including
	FormHandler form
    Tomas Doran 
    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!
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
    
    
More information about the Catalyst
mailing list