X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F19quotes.t;h=ad44bcb55086b3ca0a69b67af0fdc7c5abd651fd;hb=046a11c3f3b782279a9b3b9b073fe1893e9baca1;hp=1275db1ae5c0bbc69267b6210d11bc85c7dbc210;hpb=58d387fec14d2f92723ab0db1d64a18ee449639c;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/19quotes.t b/t/19quotes.t index 1275db1..ad44bcb 100644 --- a/t/19quotes.t +++ b/t/19quotes.t @@ -14,7 +14,7 @@ BEGIN { 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('.'); @@ -28,17 +28,17 @@ cmp_ok( $rs->count, '==', 1, "join with fields quoted"); $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/,