See my 2 comments:

>  new P0, .PerlInt
>  new P1, .PerlInt
>  new P2, .PerlInt
>  new P3, .PerlInt
>  set P0, 10
>  set P1, 11
>  set P2, 12
>
>  # outer most lexical scope
>  open_lex
   ^^^^^^^^ New pad
>  store_lex P0, "a"
>  find_lex P3, "a"
>  print P3 # prints 10
>  print "\n"
>
>    # nested lexical scope
>    open_lex
>    store_lex P1, "b"
>    find_lex P3, "b"
>    print P3 # prints 11
>    print "\n"
>
>    store_lex P2, "a" # overwrites previous "a"
     ^^^^^^^^^^^^^^^^^ Should not "overwrite", should shadow since it is
stored
                       in the current pad
>    find_lex P3, "a"
>    print P3 # prints 12
>    print "\n"
>
>    close_lex # end of nested lexical scope
     ^^^^^^^^^ Pad goes away, with "b" and "a", so the outer values
               should be back in effect.
>
>  find_lex P3, "a"
>  print P3 # prints 12
>  print "\n"
>  end

I'll apply this, since it is clean, but the semantics need adjustment.
Thanks,

-Melvin Smith

IBM :: Atlanta Innovation Center
[EMAIL PROTECTED] :: 770-835-6984


Reply via email to