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

Alejandro Imass alejandro.imass at gmail.com
Tue Aug 2 11:16:49 GMT 2011

On Tue, Aug 2, 2011 at 6:45 AM, Darius Jokilehto
<darius.jokilehto at net-a-porter.com> wrote:
> On 20/07/11 15:00, Alejandro Imass wrote:
>> The Catalyst Wiki seems to be having some problems so i posted it on PM as
>> well:
>> http://www.perlmonks.org/?node_id=915657
> In your first example,
>  $c->model('Models::People')->all()
> and
>  $c->model('Models')->schema->resultset('People');
> are not (necessarily) equivalent. The former always returns an array, the
> latter only in array context.

Yes, thanks for pointing this out. Assigning to @array saves a lot of
explaining. My idea is to focus the guide on the design patterns of
the M layer, not the details of DBIC workings, so I tried to keep the
examples "equivalent" to make the point.


Alejandro Imass

More information about the Catalyst mailing list