[Dbix-class] get $author from a row $author->books->first

Moritz Onken onken at houseofdesign.de
Fri Apr 25 12:56:38 BST 2008


Hi,

I want to add a new method to my Book class. This methods needs to  
call a relationship of $author. So how do I get the $author object if  
I am calling a function in the Book class. I get the row object by  
calling $book = $author->books->first (or similar).

I read the docs but couldn't anything but

	my $schema = $self->result_source->schema;

Which gives me the schema itself but not the $author object.

Thanks in advance,

cheers

moritz



More information about the DBIx-Class mailing list