[Catalyst] Relationship layout

Dan Boger perl at peeron.com
Mon Oct 3 16:05:25 CEST 2005


On Mon, Oct 03, 2005 at 05:36:02AM -0700, Will Smith wrote:
>    sub myrelation : Local {
>        my ( $self, $c, $id ) = @_;
>       
>        Music::M::CDBI::Artist->has_many(cd => 'Music::M::CDBI::Cd');
>       
>    ### what goes here - I am a bit confused   
>    
>        $c->stash->{template} = 'Artist/testpage.tt';
>    }

I don't think you should put the has_many in a sub - it should go right
after the package definition in M/CDBI/Cd.pm.

Or am I confused?

-- 
Dan Boger
perl at peeron.com



More information about the Catalyst mailing list