On Sun Jul 11 04:23:43 2010,
http://xenoterracide.blogspot.com/ wrote:
Show quoted text> if extending a non moose class you must disable the inline_constructor
> with make immutable. or if I'm explaining this horribly you have to
> include this code.
>
>
> __PACKAGE__->meta->make_immutable(inline_constructor => 0);
>
> MooseX::Declare does not seem to include a way of doing this.
I usually "do it by hand", like:
use MooseX::Declare;
class Freestock::Schema::DefaultRS
extends Freestock::Schema::ResultSet {
__PACKAGE__->meta->make_immutable(inline_constructor => 0);
} 1
The key bit seems to be I need to add the "1" at the end (doing this
seems to kill the automatic return 1 feature) and that it needs to be
the last thing I do.
If there's a better way would be happy to hear about it. I end up
needing to do this on all my MX:D extended DBIC stuff (Personally I find
MXD most usual at the biz logic level and nearly all that is in my DBIC
classes)
John