Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
It's for that reason that you can write my $x = 10; { my $x = $x; print $x } and get 10. Ah. This makes the behaviour of the attribute handler make sense. Hadn't thought of that. It does mean that the documentation in attributes is an oversimplification when it says:
is equivalent to
because things like this DWIM:
Right then. With the attribute issue out of the way - I'm still confused why INIT can see everything. Since you can also see everything in CHECK and END blocks, which are run after compilation, I still don't understand what is going on. In reply to Re^2: Lexical pad / attribute confusion
by adrianh
|
|