]> git.vpit.fr Git - perl/modules/Regexp-Wildcards.git/commitdiff
Enable others transformations after SQL
authorVincent Pit <vince@profvince.com>
Mon, 18 Aug 2008 21:04:51 +0000 (23:04 +0200)
committerVincent Pit <vince@profvince.com>
Mon, 18 Aug 2008 21:04:51 +0000 (23:04 +0200)
lib/Regexp/Wildcards.pm

index 756545fec6df79704200ed4f0b78eab9da67e272..5d7bf5b3f08ed09b301b9047e8fafe140443a1d2 100644 (file)
@@ -339,8 +339,11 @@ sub convert {
  my $do = $config->{do};
  my $e  = $config->{escape};
  $wc =~ s/(?<!\\)((?:\\\\)*[^\w\s\\$e])/\\$1/g;
- return $self->_sql($wc)   if $do->{sql};
- $wc = $self->_jokers($wc) if $do->{jokers};
+ if ($do->{jokers}) {
+  $wc = $self->_jokers($wc);
+ } elsif ($do->{sql}) {
+  $wc = $self->_sql($wc);
+ }
  if ($do->{brackets}) {
   $wc = $self->_bracketed($wc);
  } elsif ($do->{commas}) {