Merge 'trunk' into 'warnfree'
Peter Rabbitson [Mon, 22 Sep 2008 01:00:53 +0000 (01:00 +0000)]
Blindly silence a weird warning within a TODO in t/47bind_attribute.t. Hopefully when the TODO is resolved, it will be obvious what was causing it
Merge the t/93single_accessor_object.t fix from trunk

t/47bind_attribute.t
t/93single_accessor_object.t

index 8f66f6c..3bc1935 100644 (file)
@@ -73,6 +73,10 @@ $rs = $schema->resultset('Complex')->search({}, { bind => [ 1999 ] })
 is ( $rs->count, 1, '...cookbook (bind first) + chained search' );
 
 TODO: {
+    # not sure what causes an uninit warning here, please remove when the TODO starts to pass,
+    # so the real reason for the warning can be found and fixed
+    local $SIG{__WARN__} = sub { warn @_ unless $_[0] =~ /uninitialized/ };
+
     local $TODO = 'bind args order needs fixing (semifor)';
     $rs = $schema->resultset('Complex')->search({}, { bind => [ 1999 ] })
         ->search({ 'artistid' => 1 }, {
index 287785f..2303bdb 100644 (file)
@@ -56,7 +56,7 @@ $schema = DBICTest->init_schema();
 
 {
        my $artist = $schema->resultset('Artist')->create({ artistid => 666, name => 'bad religion' });
-       my $genre = $schema->resultset('Genre')->create({ name => 'disco' });
+       my $genre = $schema->resultset('Genre')->create({ genreid => 88, name => 'disco' });
        my $cd = $schema->resultset('CD')->create({ cdid => 187, artist => 1, title => 'how could hell be any worse?', year => 1982 });
 
        dies_ok { $cd->genre } 'genre accessor throws without column';