in reply to Re^3: Where and when you should place 'use module;'?
in thread Where and when you should place 'use module;'?
I clearly state that it is the import portion of use that is scoped to the package, so I didn't think that it was misleading, but thank you for clarifying. My key point was that no aspect of a use module is file scoped, as the upthread post claimed.
I see your point with respect to package scope, but I disagree. Scope means the area in which the symbols are immediately available and immediately effected - the current context or 'view'. In your example, the scope of an rm * is the CWD. If you cd to another directory, the scope changes, but the old scope isn't destroyed forever, it is just one step removed from the action.
This is the difference between scope and extent. Lexicals have a dynamic extent - they persist only as long as you keep a window on that scope open. Package variables have limited scope but unlimited extent.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Where and when you should place 'use module;'?
by Moron (Curate) on Oct 12, 2005 at 15:01 UTC | |
by revdiablo (Prior) on Oct 12, 2005 at 15:22 UTC | |
by Perl Mouse (Chaplain) on Oct 12, 2005 at 15:36 UTC | |
by Moron (Curate) on Oct 12, 2005 at 15:27 UTC | |
by revdiablo (Prior) on Oct 12, 2005 at 15:30 UTC | |
by fishbot_v2 (Chaplain) on Oct 12, 2005 at 16:32 UTC | |
by Moron (Curate) on Oct 13, 2005 at 11:37 UTC |