>>>>> "Roman" == Roman Daniel <[email protected]> writes:
Roman> In my app I store instances of several classes (subclasses) in one
table.
Roman> I try to implement a dispatcher which decides what class to inflate
to
Roman> according to row data loaded from db.
Roman> It seems handy for this dispatcher to be an object instead of class.
Roman> In DBIC the setter for result_class is implemented via
set_component_class,
Roman> which expects its argument to be a class - Class::Inspector->loaded
is
Roman> called on it.
Roman> I can overwrite set_component_class to fallback to set_inherited when
Roman> its argument is a blessed object, but I am not sure whether the
whole
Roman> idea is not weird. If not do you plan to allow result_class to be an
Roman> object? (it can be set to object even now but a warning is issued by
Roman> Class::Inspector)
Roman> I appreciate any comment
https://metacpan.org/module/DBIx::Class::KiokuDB does exactly what
you're trying to implement.
--
Eden Cardim
Code Monkey http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://blog.edencardim.com/ http://www.shadowcat.co.uk/servers/
http://twitter.com/#!/edenc
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]