[Dbix-class] Overriding create(), txn_do,
and 'No next::method' from Class::C3
Matt S Trout
dbix-class at trout.me.uk
Wed Jul 11 14:07:06 GMT 2007
On Tue, Jul 10, 2007 at 08:55:42PM +0100, Pedro Melo wrote:
> Hi,
>
> I'm trying to override create() on a ResultSet subclass. Inside I
> defined a create() method.
Never override create.
It's always just a piece of syntactic sugar that does a new() followed by
calling insert() on the newly created object, and the internals happily ignore
it as such in a lot of cases.
You should always override either the ResultSet new_result() method or new()
or insert() on the result class.
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/
More information about the Dbix-class
mailing list