I'm not a regular user of the perldebugger, but my understanding was that x worked from the package scope, not the lexical scope. If you wanted to dive down into the lexical scope, you needed y (and the PadWalker module). The debugger isn't terribly smart... hooked around the whole application, and thus outside the lexical scope in question. It's non-trivial to probe a lexical/local from outside their scope.
This appears true for my lexicals and locals. Try:
my $foo = 10; $bar = 10; sub somelocals { my $foo = 42; local $bar = 42; # "x $foo", "x $bar" are 10 here } somelocals();
Update:
This seems version dependent - my results and yours are consistent with v5.8.0. On v5.8.6, I see the opposite behaviour with x. (ie. lexicals are exposed as expected.)
re-Update:
Ignore. My testing was flawed.
In reply to Re: confused about local $/ in perl debugger
by fishbot_v2
in thread confused about local $/ in perl debugger
by lupey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |