On Wed, Jan 4, 2012 at 10:25 AM, Tomas Doran <bobtf...@bobtfish.net> wrote:
> This is because initialization or the slots in the instance will happen in > a random order.. > > So what's happening is that 'details' is being initialized (and so calling > it's _build_details method) before '_temp_details' is initialized, which > results in the temp_details accessor returning nothing when it's called (as > _temp_details hasn't been initialized yet). > > You need to add a 'lazy => 1' to the 'details' attribute, and all should > be well... > > (If you _really_ want to ensure that the details attribute is built at > construction time, then also add a BUILD method that just calls the > accessor - ensuring the value gets built). > > HTH > 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! -- Steve Rippl Technology Director Woodland Public Schools 360 841 2730
_______________________________________________ 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/