[Catalyst] Using C::DBI::Loader::Relationship with Model::CDBI?

Andy Grundman andy at hybridized.org
Wed Apr 6 00:00:03 CEST 2005


Sebastian Riedel wrote:
> try
> 
>     use NEXT;
> 
>     sub new {
>         my $class = shift;
>         my $self    = $class->NEXT::new(@_);
>         $self->loader->relationship(...);
>         return $self;
>     }

Nice, this works!  But I don't really understand why it does.  The 
Relationship class just adds a relationship() method to 
Class::DBI::Loader::Generic's namespace.  I guess the object getting set 
in loader() was created before Relationship was added, or something like 
that?

FYI I didn't need 'use NEXT;' for whatever reason.

--
Andy Grundman



More information about the Catalyst mailing list