[Dbix-class] Difficulties with DBIx::Class inheritance
A. Pagaltzis
pagaltzis at gmx.de
Sat Jun 24 17:55:42 CEST 2006
* Rich <scriptyrich at yahoo.co.uk> [2006-06-24 17:15]:
> Could anyone help me get my head around how I implement a
> common base class for, and subclasses of, autogenerated
> DBIx::Class classes?
>
> Going with a simple example:
>
>
> Foo::User Foo::Project <<< My sub classes
> | |
> | |
> Foo::user Foo::project <<< sqlt generated DBIx::Class classes
> \ /
> \ /
> \ /
> \ /
> \ /
> \ /
> Foo::Base <<< Common functionality
I’m going to go out entirely on a lark and say you’ll probably be
able to get what you want quite easily if you use a different
inheritance tree:
Foo::User Foo::Project <<< Subclasses
|\ /|
| \ / |
| \ / |
Foo::user \ / Foo::project <<< sqlt generated DBIx::Class classes
\ /
\ /
Foo::Base <<< Common functionality
Regards,
--
#Aristotle
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;
More information about the Dbix-class
mailing list