From: Arthur Axel 'fREW' Schmidt Date: Wed, 25 Jan 2012 02:02:37 +0000 (-0600) Subject: lazify things X-Git-Tag: v0.11011~27^2~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=28f1fad79692da543eeeaa4c306f82f8632701ed;p=dbsrgits%2FSQL-Translator.git lazify things --- diff --git a/lib/SQL/Translator/Generator/DDL/SQLServer.pm b/lib/SQL/Translator/Generator/DDL/SQLServer.pm index 7d82eef..5d0f446 100644 --- a/lib/SQL/Translator/Generator/DDL/SQLServer.pm +++ b/lib/SQL/Translator/Generator/DDL/SQLServer.pm @@ -30,8 +30,7 @@ sub _build_type_map { } has sizeless_types => ( - is => 'ro', - builder => '_build_sizeless_types', + is => 'lazy', ); sub _build_sizeless_types { diff --git a/lib/SQL/Translator/Generator/DDL/SQLite.pm b/lib/SQL/Translator/Generator/DDL/SQLite.pm index 63c5d42..8c58869 100644 --- a/lib/SQL/Translator/Generator/DDL/SQLite.pm +++ b/lib/SQL/Translator/Generator/DDL/SQLite.pm @@ -17,8 +17,7 @@ sub _build_type_map { } has sizeless_types => ( - is => 'ro', - builder => '_build_sizeless_types', + is => 'lazy', ); sub _build_sizeless_types { +{ text => 1 } } diff --git a/lib/SQL/Translator/Generator/Role/DDL.pm b/lib/SQL/Translator/Generator/Role/DDL.pm index 6dc0252..766ff8f 100644 --- a/lib/SQL/Translator/Generator/Role/DDL.pm +++ b/lib/SQL/Translator/Generator/Role/DDL.pm @@ -10,18 +10,15 @@ requires 'field_type_size'; requires 'quote'; has type_map => ( - is => 'ro', - builder => '_build_type_map', + is => 'lazy', ); has numeric_types => ( - is => 'ro', - builder => '_build_numeric_types', + is => 'lazy', ); has unquoted_defaults => ( - is => 'ro', - builder => '_build_unquoted_defaults', + is => 'lazy', ); has add_comments => (