From: exercism-1 Date: Thu, 25 Jan 2018 12:41:15 +0000 (+0100) Subject: avoid conditional variable declaration X-Git-Tag: v1.59_01~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6e9cebc99f0891387393de24b6041f2cbb4877b8;p=dbsrgits%2FSQL-Translator.git avoid conditional variable declaration perldoc perlsyn: > The behaviour of a `my`, `state`, or `our` modified with a statement modifier conditional or loop construct (for example, `my $x if ...` ) is **undefined**. --- diff --git a/lib/SQL/Translator/Producer/SQLite.pm b/lib/SQL/Translator/Producer/SQLite.pm index 9cc92af..ffbbbe0 100644 --- a/lib/SQL/Translator/Producer/SQLite.pm +++ b/lib/SQL/Translator/Producer/SQLite.pm @@ -66,7 +66,8 @@ sub produce { local $NO_QUOTES = 0 if $translator->quote_identifiers and $translator->quote_identifiers ne '0E0'; - my $head = (header_comment() . "\n") unless $no_comments; + my $head; + $head = (header_comment() . "\n") unless $no_comments; my @create = ();