Use quote_sub for trivial coercions
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Schema / Table.pm
index b256f6c..eaae5d0 100644 (file)
@@ -405,7 +405,7 @@ all the comments joined on newlines.
 
 has comments => (
     is => 'rw',
-    coerce => sub { ref($_[0]) eq 'ARRAY' ? $_[0] : [$_[0]] },
+    coerce => quote_sub(q{ ref($_[0]) eq 'ARRAY' ? $_[0] : [$_[0]] }),
     default => quote_sub(q{ [] }),
 );