At least for the usage described in this thread, I don't see any need at all to add new syntax to Perl 6. The existing syntax provides for a much simpler solution yet, which also is in Perl 5.

This is the format of what I do to solve the same problem right now in my Locale::KeyedText test suite:

    my ($sql, $foo, $bar);

    $sql = q{...};
    ...do some db stuff, also using $foo and $bar...
    $sql = q{...};
    ...do some db stuff, also using $foo and $bar...
    $sql = q{...};
    ...do some db stuff, also using $foo and $bar...

In other words, the simple solution is to declare the variable and use it on SEPARATE LINES! Then you can cut/copy/paste/reorder usage lines with impunity as you wanted.

Not only does this not require a new dubious language feature, but it also wins for brevity.

Keep it simple, as it is said.

Reserve any new syntax for when it is genuinely useful.

-- Darren Duncan

Reply via email to