1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
22 # check DBI behavior when fed a stringifiable/nummifiable value
24 my $crazynum = bless {}, 'DBICTest::CrazyInt';
25 cmp_ok( $crazynum, '==', 666 );
26 cmp_ok( $crazynum, 'eq', 999 );
28 my $schema = DBICTest->init_schema( no_populate => 1 );
29 $schema->storage->dbh_do(sub {
30 $_[1]->do('INSERT INTO artist (name) VALUES (?)', {}, $crazynum );
33 is( $schema->resultset('Artist')->next->name, 999, 'DBI preferred stringified version' );