X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F08special_ops.t;h=d989a79b0b78819cde60bcf7899c0163d1bdcbdf;hb=60f3fd3f62543eeefdf2ec711b085e360fe89c6e;hp=7632be4289d5d9795ad9a07a1f7c72d8274877fe;hpb=10e6c94609fc94467ef8f281ffe192d8038ffc9e;p=dbsrgits%2FSQL-Abstract.git diff --git a/t/08special_ops.t b/t/08special_ops.t index 7632be4..d989a79 100644 --- a/t/08special_ops.t +++ b/t/08special_ops.t @@ -1,5 +1,3 @@ -#!/usr/bin/perl - use strict; use warnings; use Test::More; @@ -11,7 +9,7 @@ use SQL::Abstract; my $sqlmaker = SQL::Abstract->new(special_ops => [ # special op for MySql MATCH (field) AGAINST(word1, word2, ...) - {regex => qr/^match$/i, + {regex => qr/^match$/i, handler => sub { my ($self, $field, $op, $arg) = @_; $arg = [$arg] if not ref $arg; @@ -26,7 +24,7 @@ my $sqlmaker = SQL::Abstract->new(special_ops => [ }, # special op for Basis+ NATIVE - {regex => qr/^native$/i, + {regex => qr/^native$/i, handler => sub { my ($self, $field, $op, $arg) = @_; $arg =~ s/'/''/g; @@ -39,7 +37,7 @@ my $sqlmaker = SQL::Abstract->new(special_ops => [ my @tests = ( - #1 + #1 { where => {foo => {-match => 'foo'}, bar => {-match => [qw/foo bar/]}}, stmt => " WHERE ( MATCH (bar) AGAINST (?, ?) AND MATCH (foo) AGAINST (?) )",