go ahead... be a heretic | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I recall this behavior being mentioned in a thread here not too long ago, unfortunately I can't seem to find it at the moment. (Update: AM found it, thanks) The use docs do say that it is "exactly equivalent" to BEGIN { require Module; Module->import( LIST ); }, which is pretty explicit. So taking that into account the behavior makes sense. But from a user's standpoint, the implicit block is certainly surprising. My first thoughts on this are that I'm not sure if it would be possible to get rid of the extra scope though... whether something happens at compile time or runtime can make a huge difference if it has side effects (not necessarily variable declarations, but the LIST can be arbitrarily complex). In reply to Re: Scope in use
by haukex
|
|