Matt S Trout wrote:
> On Tue, Nov 11, 2008 at 12:10:03PM +0000, Dave Howorth wrote:
>> Dave Howorth wrote:
>>> I've poked around some more and think I've found the source of the
>>> problem. I went back to a small example that worked and then
>>> experimented until it broke.
>> I looked at the cdbi-t tests to see how connection() is tested. AFAICT,
>> it isn't! So here are two tests for connection. The first one passes for
>> me and the second one fails.
> 
> Are you testing against CPAN or dev release? The latter has many many
> fixes by schwern integrated. If you can produce a test against current
> trunk that still fails, we can see about digging around and fixing it.

I'm running against a dev release. I just updated to rev 5158 and ran
the tests again with the same results - #1 works, #2 fails.

In poking around to get my code working I found that a lot of POD in
DBIx::Class::DB has been concealed because the class is deprecated
except for CDBICompat. Once I discovered it, that POD gave me a hint and
I've found that adding the line:

  __PACKAGE__->setup_schema_instance;

immediately after

  use base 'DBIx::Class::CDBICompat';

appears to make my code work.

So I'd suggest that at a minimum the description of that method ought to
be copied into the LIMITATIONS section of the DBIx::Class::CDBICompat
POD. I don't know if any more of that POD is also still relevant.

Nicer would be something that called the method automatically, of course
:) But I haven't figured that out.

Cheers, Dave

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to