Skip Menu |
 

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 41083
Status: resolved
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: jmmills@cpan.org (no email address)
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.08010
Fixed in: 0.08101



Subject: proxy sub-class throws warning from DBIx::Class::Schema::load_namepaces
Download (untitled) / with headers
text/plain 175b
When sub classing a proxy class in a .pm file rather than in the same .pm file as the parent class load_namespaces throws a warning about a resultset class already being set.
Subject: Re: [rt.cpan.org #41083] proxy sub-class throws warning from DBIx::Class::Schema::load_namepaces
Date: Sat, 6 Dec 2008 17:19:47 +0000
To: "Jason M. Mills via RT" <bug-DBIx-Class [...] rt.cpan.org>
From: Matt S Trout <mst [...] shadowcat.co.uk>
On Thu, Nov 20, 2008 at 03:09:10AM -0500, Jason M. Mills via RT wrote: Show quoted text
> Thu Nov 20 03:09:08 2008: Request 41083 was acted upon. > Transaction: Ticket created by JMMILLS > Queue: DBIx-Class > Subject: proxy sub-class throws warning from DBIx::Class::Schema::load_namepaces > Broken in: 0.08010 > Severity: Normal > Owner: Nobody > Requestors: jmmills@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=41083 > > > > When sub classing a proxy class in a .pm file rather than in the same > .pm file as the parent class load_namespaces throws a warning about a > resultset class already being set.
Er, could you put together an example? I tried to parse your sentence and my brain exploded. -- 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/
Download (untitled) / with headers
text/plain 996b
http://dev.catalyst.perl.org/repos/bast/DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083 39load_namespaces_rt41083.t On Sat Dec 06 12:19:58 2008, mst@shadowcat.co.uk wrote: Show quoted text
> On Thu, Nov 20, 2008 at 03:09:10AM -0500, Jason M. Mills via RT wrote:
> > Thu Nov 20 03:09:08 2008: Request 41083 was acted upon. > > Transaction: Ticket created by JMMILLS > > Queue: DBIx-Class > > Subject: proxy sub-class throws warning from
> DBIx::Class::Schema::load_namepaces
> > Broken in: 0.08010 > > Severity: Normal > > Owner: Nobody > > Requestors: jmmills@cpan.org > > Status: new > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=41083 > > > > > > > When sub classing a proxy class in a .pm file rather than in the
> same
> > .pm file as the parent class load_namespaces throws a warning about
> a
> > resultset class already being set.
> > Er, could you put together an example? I tried to parse your sentence > and > my brain exploded. >
Subject: Possible fix...
Download (untitled) / with headers
text/plain 1.1k
Committed a simple fix - http://dev.catalyst.perl.org/repos/bast/DBIx-Class/0.08/branches/rt_bug_41083 I'm not sure if this is the "correct" solution; but the gist of it is that there is a check to make sure that you don't set a result set to a result class when a result class already has a result set. This incorrectly throws a warning when sub-classing a result class. (usage example: http://search.cpan.org/~ash/DBIx-Class-0.08010/lib/DBIx/Class/Manual/Cookbook.pod#Dynamic_Sub-classing_DBIx::Class_proxy_classes) Here is my test results there are some fails but I think those carried over from trunk: Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/66relationship.t 3 768 72 3 4.17% 68-70 t/96multi_create.t 4 1024 89 4 4.49% 11 40 42-43 (3 subtests UNEXPECTEDLY SUCCEEDED), 18 tests and 57 subtests skipped. Failed 2/105 test scripts, 98.10% okay. 7/2735 subtests failed, 99.74% okay. If someone who knows the DBIx::Class::Schema->load_namespaces would like to verify my fix it would be like really really cool. - J


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.