[Dbix-class] Using { count => 'me.list_id' } with AS hack from the FAQ

Kevin Old kevinold at gmail.com
Thu Oct 12 03:39:16 CEST 2006


On 10/11/06, Jess Robinson <castaway at desert-island.demon.co.uk> wrote:
>
>
> On Tue, 10 Oct 2006, Kevin Old wrote:
>
> > Ok, I have what I want working.  I'm doing this:
> >
> > The hack at http://search.cpan.org/~danieltwc/DBIx-Class-0.07002/lib/DBIx/Class/Manual/FAQ.pod,
> > said there was a way to append the AS clause to the sql statement, but
> > I haven't been able to get it to work.
> >
> > This, of course doesn't work.  It fails from perl, but it's exactly
> > what the POD docs say.
> >
> > select => [ 'theclass.classification_description', { count =>
> > 'me.list_uid' }, \'as list_count', 'me.list_uid', 'toplist.market',
> > 'theclass.classification_uid'],
> >
>
> Hi,
>
> I wrote that FAQ entry.. Can you tell me how you got the idea that it
> says/meant "append" the AS clause? Or at least give me ideas how to word
> it so that people won't get that impression? I'm fairly sure thats not
> what it says.. what you have done is exactly what was meant (though in
> typnig it up you seem to have forgotten the backslash).
>
> Jess

Hi Jess,

Well, I went back and reread it and the select/as sections of the
DBIx::Class::ResultSet POD as well and am not sure how I interpreted
that I was to append it.

It was clearly my mistake, and I appreciate your help with this.

Thanks,
Kevin
-- 
Kevin Old
kevinold at gmail.com



More information about the Dbix-class mailing list