in reply to Re^7: Convenient way to use 5.10 features in perldebugger?
in thread Convenient way to use 5.10 features in perldebugger?

not a matter of scope...

DB<32> < $main::a++ DB<33> print $main::a 5 DB<34> print $main::a 5 DB<35> print $main::a 5

maybe the use is restricted to real debugging (breakpoints and so on ..) and not meant for interactive shells.

Cheers Rolf

Replies are listed 'Best First'.
Re^9: Convenient way to use 5.10 features in perldebugger?
by ikegami (Patriarch) on Aug 16, 2010 at 06:42 UTC
    Your code does not demonstrate your statement. Showing you can access the value of a global variable does not say anything about scope.
      I said:
      not a matter of scope ...

      Obviously the value is not incremented automatically!

      Cheers Rolf

        It is a matter scope. use features is lexically scoped, and james2vegas demonstrated each statement has its own scope.

        Your statement is false, and your code does not support your statement.

Re^9: Convenient way to use 5.10 features in perldebugger?
by LanX (Saint) on Aug 17, 2010 at 19:27 UTC
    > maybe the use is restricted to real debugging (breakpoints and so on ..) and not meant for interactive shells.

    actually that's the case, e.g. when stepping with n thru a program the pre- and post-prompt commands are executed.

    They are NOT executed when entering any perl lines.

    to test try something like  perl -de'for (1..1000) {0}' and type n.

    And BTW all these automatic commands have their own scope.

    Cheers Rolf