From: Ash Berlin Date: Tue, 10 Mar 2009 18:18:31 +0000 (+0000) Subject: Replace lazy_build with lazt + builder X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eb22ecd3c75a84da53c208d8630039baafd19008;p=dbsrgits%2FSQL-Abstract-2.0-ish.git Replace lazy_build with lazt + builder --- diff --git a/lib/SQL/Abstract.pm b/lib/SQL/Abstract.pm index e95b8b8..1963975 100644 --- a/lib/SQL/Abstract.pm +++ b/lib/SQL/Abstract.pm @@ -36,7 +36,8 @@ class SQL::Abstract { has where_dispatch_table => ( is => 'ro', - lazy_build => 1, + lazy => 1, + builder => '_build_where_dispatch_table', isa => HashRef[CodeRef], metaclass => 'Collection::ImmutableHash', provides => { @@ -46,7 +47,8 @@ class SQL::Abstract { has binop_map => ( is => 'ro', - lazy_build => 1, + lazy => 1, + builder => '_build_binops', isa => HashRef, metaclass => 'Collection::ImmutableHash', provides => { @@ -56,7 +58,8 @@ class SQL::Abstract { } ); - sub _build_binop_map { return {%BINOP_MAP} }; + # List of default binary operators (for in where clauses) + sub _build_binops { return {%BINOP_MAP} }; method _build_where_dispatch_table { my $binop = $self->can('_binop') or croak "InternalError: $self can't do _binop!";