Columns substitution?

[prev] [thread] [next] [Date index for 2005/05/25]

From: Lonely Rolling Star
Subject: Columns substitution?
Date: 23:14 on 25 May 2005
I think it would be handy to have a transform_sql substitution akin 
to __ESSENTIAL__ that would drop in a particular column group instead 
of the Essential group.

I've added this to transform_sql:
$sql =~ s/__COLUMNS\((.*?)\)__/join ", ", map "$_", $self->columns($1)/eg;

Which makes __COLUMNS(Foo)__ expand to the list of columns defined 
earlier by __PACKAGE__->columns(Foo => ...)

Thoughts? Did I miss an easy way to do this?


        -- 
        Aneel Nazareth -- http://eye-of-newt.com/nazareth --

(message missing)

Columns substitution?
Lonely Rolling Star 23:14 on 25 May 2005

Re: Columns substitution?
Tony Bowden 07:50 on 27 May 2005

Re: Columns substitution?
Matt S Trout 12:48 on 27 May 2005

Re: Columns substitution?
Tony Bowden 12:53 on 27 May 2005

Re: Columns substitution?
Aaron Trevena 13:19 on 28 May 2005

Re: Columns substitution?
Tony Bowden 15:39 on 28 May 2005

Re: Columns substitution?
Aaron Trevena 16:45 on 28 May 2005

Re: Columns substitution?
Tony Bowden 20:47 on 28 May 2005

Generated at 20:11 on 05 Jun 2005 by mariachi v0.52