[Catalyst] DBIC ResultSet - what columns in it?

Ash Berlin ash_cpan at firemirror.com
Wed Dec 19 09:19:54 GMT 2007


On 19 Dec 2007, at 05:09, Silvio Almeida wrote:

> I was looking for a way to get column names from a ResultSet.
>
> If I have a table with columns id, to, from, subject which is mapped  
> into Email then if I do
>
> $c->model('Email')->{_source_handle}{schema}{source_registrations} 
> {Reuniao}{_ordered_columns}
>
> then I get [ qw/ id to from subject / ] indeed, but it would be nice  
> to have a simpler method to get there.
>
>
> Silvio

As an indication, if you are using a method or accessor that starts  
with '_' then you are doing something wrong - underscore implies it is  
'private'.

Also the string you are passing to $c->model looks wrong... I'd expect  
there to be a MyDB:: or similar in front of that.

Ash




More information about the Catalyst mailing list