Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

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

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


chris at chrisdolan

Jul 17, 2008, 8:14 PM

Post #1 of 5 (1566 views)
Permalink
5.80 problem with Catalyst::Model::DBIC::Schema

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?

Chris


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


bobtfish at bobtfish

Jul 18, 2008, 3:24 AM

Post #2 of 5 (1453 views)
Permalink
Re: 5.80 problem with Catalyst::Model::DBIC::Schema [In reply to]

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

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


bobtfish at bobtfish

Jul 30, 2008, 10:12 AM

Post #3 of 5 (1419 views)
Permalink
Re: 5.80 problem with Catalyst::Model::DBIC::Schema [In reply to]

On 18 Jul 2008, at 11:24, Tomas Doran wrote:

>
> 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.

FYI, this issue has now been fixed.

Would be grateful if you could retest, and let us know if this fixes
the problem that you were seeing.

Cheers
t0m


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


chris at chrisdolan

Jul 30, 2008, 10:00 PM

Post #4 of 5 (1399 views)
Permalink
Re: 5.80 problem with Catalyst::Model::DBIC::Schema [In reply to]

On Jul 30, 2008, at 12:12 PM, Tomas Doran wrote:

> On 18 Jul 2008, at 11:24, Tomas Doran wrote:
>
>> 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.
>
> FYI, this issue has now been fixed.
>
> Would be grateful if you could retest, and let us know if this
> fixes the problem that you were seeing.
>
> Cheers
> t0m

Yep, that error is gone (tested 8171). The next error I see is:

[error] Caught exception in engine "Can't use an undefined value as
an ARRAY reference at /Users/chris/Work/Catalyst/Catalyst-Runtime/
5.80/trunk/lib/Catalyst.pm line 1244."

where line 1244 is:
push( @{ $c->stack }, $code );
and "stack" comes from
has stack => (is => 'rw', default => sub { [] });
That looks pretty straightforward...

Email me off-list if I can provide any more helpful information about
my environment.

Chris


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


dbix-class at trout

Aug 3, 2008, 5:45 AM

Post #5 of 5 (1386 views)
Permalink
Re: 5.80 problem with Catalyst::Model::DBIC::Schema [In reply to]

On Thu, Jul 31, 2008 at 12:00:52AM -0500, Chris Dolan wrote:
> Yep, that error is gone (tested 8171). The next error I see is:
>
> [error] Caught exception in engine "Can't use an undefined value as
> an ARRAY reference at /Users/chris/Work/Catalyst/Catalyst-Runtime/
> 5.80/trunk/lib/Catalyst.pm line 1244."
>
> where line 1244 is:
> push( @{ $c->stack }, $code );
> and "stack" comes from
> has stack => (is => 'rw', default => sub { [] });
> That looks pretty straightforward...
>
> Email me off-list if I can provide any more helpful information about
> my environment.

That's ... fucking odd.

Could you make sure you have latest of everything matching qr/^Moose/
and if it persists see if you can post a small example app that explodes
with this error?

--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/

_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.