[Catalyst] Model Instances vs. Model Classes - Round 2

Alejandro Imass alejandro.imass at gmail.com
Thu Jul 28 19:22:19 GMT 2011


On Wed, Jul 20, 2011 at 12:50 PM, Peter Flanigan <pjf at roxsoft.co.uk> 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: Catalyst at 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/
>



More information about the Catalyst mailing list