Use quote_sub for trivial coercions
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Role / Debug.pm
index 551f30d..671e00a 100644 (file)
@@ -1,11 +1,12 @@
 package SQL::Translator::Role::Debug;
 use Moo::Role;
+use Sub::Quote qw(quote_sub);
 
 has _DEBUG => (
     is => 'rw',
     accessor => 'debugging',
     init_arg => 'debugging',
-    coerce => sub { $_[0] ? 1 : 0 },
+    coerce => quote_sub(q{ $_[0] ? 1 : 0 }),
     lazy => 1,
     builder => 1,
 );