in reply to Re^5: Which "use" statements in a module do "bubble up" to the callers?
in thread Which "use" statements in a module do "bubble up" to the callers? [SOLVED]
Wow, that is tricky. Thank you very much!
I would not have come to the idea that a pragma's subpragma might be scoped in another way than the pragma itself or its other subpragmas. That's the reason why I haven't found it in the documentation. But even if I had found it: IMHO, "... without mentioning lexical scope." for most people (including myself) implies "With this subpragma, nothing is different regarding the lexical scope from what has been said earlier in that text". This is very worrying and probably should be improved (to make myself clear: The Perl documentation is one of the best documentations I have ever seen, but even in the best documentation, there is always room for improvement).
Finally, thinking about your last statement in your last comment took me quite a while, and I did some tests. If choroba really tried to say what you suspect, I think he is wrong:
If I have a lexically scoped pragma at the top my main script, and if I then use another module, the pragma will not be in effect during initialization (i.e. during loading and compiling at compile time) of that other module. I can give a code example if I didn't manage to express clearly enough what I wanted to say.
Thank you very much,
Nocturnus
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Which "use" statements in a module do "bubble up" to the callers? (updated)
by haukex (Archbishop) on Sep 02, 2017 at 10:56 UTC | |
by Nocturnus (Scribe) on Sep 02, 2017 at 13:51 UTC |