8 if( ! $Config{useithreads} ) {
9 $skipall = 'your perl does not support ithreads';
11 elsif( "$]" < 5.008005 ) {
12 $skipall = 'DBIC does not actively support threads before perl 5.8.5';
14 elsif( $INC{'Devel/Cover.pm'} ) {
15 $skipall = 'Devel::Cover does not work with ithreads yet';
19 print "1..0 # SKIP $skipall\n";
26 use DBIx::Class::_Util 'hrefaddr';
27 use Scalar::Util 'weaken';
30 package DBICTest::Ancestry::Result;
32 use base 'DBIx::Class::Core';
34 __PACKAGE__->table("foo");
38 package DBICTest::Ancestry::Schema;
40 use base 'DBIx::Class::Schema';
42 __PACKAGE__->register_class( r => "DBICTest::Ancestry::Result" );
45 my $schema = DBICTest::Ancestry::Schema->clone;
46 my $rsrc = $schema->resultset("r")->result_source->clone;
50 my $another_rsrc = $rsrc->clone;
53 refaddrify( DBICTest::Ancestry::Result->result_source_instance->__derived_instances ),
55 DBICTest::Ancestry::Schema->source("r"),
64 $another_rsrc->schema(undef);
67 refaddrify( DBICTest::Ancestry::Result->result_source_instance->__derived_instances ),
69 DBICTest::Ancestry::Schema->source("r"),
74 # tasty crashes without this
75 select( undef, undef, undef, 0.2 );
79 [ sort map { hrefaddr $_ } @_ ];