On 8/20/06, Joshua Hoblitt <[EMAIL PROTECTED]> wrote:
This is exactly the type of construct that I had in mind.  A couple of
questions. Is code inside of a #{}:

    - parsed and required to be syntacticly correct?

No.  It's a comment. # followed by one or more open bracket characters
creates a comment that lasts until the matching closing bracket
character(s).   It is otherwise exactly treated as single-line
comments.  So:

    - does it still appear in emitted code?

Not sure what you mean here.


    - what happens when a goto tries to enter into this block

It fails because the label it's referencing doesn't exist.

      or a nested sub is invoked?

Ditto.

    - will the optimizer spend time on this block?

No.


Note, however, that Luke's example is incorrect according to S02.  A
line beginning with #{ doesn't start a bracketed comment; it's treated
as a single-line comment.  You need to put something before the # on
the line.

--
Mark J. Reed <[EMAIL PROTECTED]>

Reply via email to