From: Rafael Kitover Date: Fri, 5 Mar 2010 23:07:16 +0000 (-0500) Subject: Firebird: cleanup trigger parsing code a bit X-Git-Tag: 0.06000~60 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0e0a494101431dd7aba30529469904f74541639e;p=dbsrgits%2FDBIx-Class-Schema-Loader.git Firebird: cleanup trigger parsing code a bit --- diff --git a/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm b/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm index c8c2fa6..1d62ef9 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/InterBase.pm @@ -139,11 +139,14 @@ EOF my ($quoted, $generator) = $trigger =~ /(?:gen_id\s* \( \s* |next \s* value \s* for \s*)(")?(\w+)/ix; - $generator = uc $generator unless $quoted; - - if ((first { $_ eq $column } @trig_cols) && $generator) { - $extra_info{is_auto_increment} = 1; - $extra_info{sequence} = $generator; + if ($generator) { + $generator = uc $generator unless $quoted; + + if (first { $_ eq $column } @trig_cols) { + $extra_info{is_auto_increment} = 1; + $extra_info{sequence} = $generator; + last; + } } }