From: Matt S Trout Date: Tue, 1 Oct 2019 03:28:20 +0000 (+0000) Subject: move more to register X-Git-Tag: v1.90_01~35 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=47662caa5fb4467570af9f7b0fb3dffca20c7ed7;p=dbsrgits%2FSQL-Abstract.git move more to register --- diff --git a/lib/SQL/Abstract/ExtraClauses.pm b/lib/SQL/Abstract/ExtraClauses.pm index c0e753d..f639773 100644 --- a/lib/SQL/Abstract/ExtraClauses.pm +++ b/lib/SQL/Abstract/ExtraClauses.pm @@ -54,10 +54,12 @@ sub register_extensions { 'select.having' => sub { $_[0]->expand_expr($_[2]) }, ); - foreach my $thing (qw(join from_list)) { - $sqla->expander($thing => $self->cb("_expand_${thing}")) - ->renderer($thing => $self->cb("_render_${thing}")) - } + $self->register( + expander => (join => '_expand_join', from_list => '_expand_from_list') + ); + $self->register( + renderer => (join => '_render_join', from_list => '_render_from_list') + ); $sqla->binop_expander(as => $self->cb('_expand_op_as')); $sqla->renderer(as => $self->cb('_render_as')); $sqla->expander(alias => $self->cb('_expand_alias'));