[Catalyst] 5.80 problem with Catalyst::Model::DBIC::Schema

Tomas Doran bobtfish at bobtfish.net
Fri Jul 18 11:24:34 BST 2008


On 18 Jul 2008, at 04:14, Chris Dolan wrote:

> So, I just tested 5.7099_02 to great success (bravo!) so I decided  
> to try 5.80 too.
>
> When using SVN rev 8136, I get the error
>   "->config->{schema_class} must be defined for this model"
> I am indeed setting that field (following the instructions in  
> Catalyst::Model::DBIC::Schema 0.20 to the letter) but it looks like  
> the schema_class is not getting propagated from the config to the  
> Catalyst::Model::DBIC::Schema instance via Catalyst::Component::new.
>
> Is this a known problem?  Do I need any blead packages other than  
> Catalyst::Runtime for a proper test?
>

I haven't looked at this specific issue, but I'd be prepared to bet  
it's a known issue, which I have looked into.

http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/5.80/ 
trunk/lib/Catalyst/Model.pm

See the commented out #__PACKAGE__->meta->make_immutable();

(and the comment below it) - that's the known bug.. You'll *also*  
notice that this statement is replicated at the bottom of the file,  
not commented out (which is what causes your issues).

There *is* a failing test in Moose for this issue:

http://code2.0beta.co.uk/moose/svn/Moose/trunk/t/600_todo_tests/ 
003_immutable_n_around.t

However it'd be good if we could just comment out the make_immutable  
lines in 5.80 trunk in the short term until this actually gets fixed,  
as I'm also chomping at the bit to start testing Catamoose.. Having  
said that, I've been getting round to writing a test in Catalyst for  
this issue for weeks, so my grumbles about it not working (when  
Catalyst doesn't have failing tests) can at best be considered  
bikeshedding at this point..

Cheers
t0m



More information about the Catalyst mailing list