[Dbix-class] role of result class?

Richard Jolly richardjolly at mac.com
Tue Mar 7 08:31:26 CET 2006


Hi,

I'm trying to understand the role of the result_class, and I have what 
I think are naive questions.

In a schema with

   My::Schema::Artist

   ...

   my $schema->resultset('Artist')->search();
   My::Artist->search();

Are the last two lines identical? Why is the first the preferred syntax?

Secondly, when over riding resultset methods for a specific class I 
believe the new methods get defined in My::Schema::Artist. But you 
could put them in My::Artist as well, and they would just sit slightly 
higher up the MRO. Does anyone actually put methods in the result class 
file?

Thanks,

Richard




More information about the Dbix-class mailing list