use lib qw(t/lib);
use_ok('DBICTest');
-DBICTest::init_schema();
+DBICTest->init_schema();
DBICTest->schema->storage->sql_maker->quote_char("'");
DBICTest->schema->storage->sql_maker->name_sep('.');
$rs = DBICTest::CD->search({},
{ 'order_by' => 'year DESC'});
{
- my $warnings;
+ my $warnings = '';
local $SIG{__WARN__} = sub { $warnings .= $_[0] };
my $first = eval{ $rs->first() };
- ok( $warnings =~ /ORDER BY terms/, "Problem with ORDER BY quotes" );
+ like( $warnings, qr/ORDER BY terms/, "Problem with ORDER BY quotes" );
}
my $order = 'year DESC';
$rs = DBICTest::CD->search({},
{ 'order_by' => \$order });
{
- my $warnings;
+ my $warnings = '';
local $SIG{__WARN__} = sub { $warnings .= $_[0] };
my $first = $rs->first();
ok( $warnings !~ /ORDER BY terms/,