Hi,

I'm working on a problem for a friend generating sql statements. The statement is supposed to look like this:

    SELECT @foo    = foo,
           @bar    = bar,
           @quxxum = quxxum
     from ...

I want to do something like this:

    SELECT [% assigned_to_npk_columns %]
      from ...

The "@" signs need to line up. If my assigned_to_npk_columns macro could know where on the line it is being called, it could do the right thing, that is, no idention on the first line of the loop, and then (in this case) 11 spaces in in subsequent lines.

Is there anything I can use to get this number? I was thinking about a rawperl block that examined $output and counted the spaces between the last newline and the end of the string. Not sure if that would work, but I would like to do something more blessed into the framework if it exists.

mike
--
-----------------------------------------
     Name : Mike South
    Title : Software Developer
  Company : McClatchy Interactive
    Phone : (919) 861-1259
     Cell : (919) 624-5071
      Fax : (919) 861-1300
    Email : [EMAIL PROTECTED]
      AIM : msouthmi
 Web Site : http://www.mcclatchyinteractive.com/
-----------------------------------------

_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to