On Wed, Jul 20, 2011 at 12:50 PM, Peter Flanigan <[email protected]> wrote: > On 20/07/11 07:25, Alejandro Imass wrote: >> >> http://wiki.catalystframework.org/wiki/best_practices/models_definitive_guide >> > > In this example > > package Models::Model::HomeGrownModel; > > use base 'Catalyst::Model'; > > use HomeGrown; > > sub COMPONENT { > my ( $self, $app ) = @_; > my $dbic_schema = $app->model('ModelsDB')->schema; > return HomeGrown->new( schema => $dbic_schema ); > } > > how are you ensuring 'ModelsDB' has been instantiated before > 'HomeGrownModel'? >
I updated the Perlmonks article and the code in SVN to reflect this fix. http://www.perlmonks.org/?node_id=915657 Thanks for pointing this out. I will proceed to update the Catalyst Wiki as well.... -- Alejandro > -- > > Regards > > _______________________________________________ > List: [email protected] > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/[email protected]/ > Dev site: http://dev.catalyst.perl.org/ > _______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
