in reply to "use" location within a program - it matters??
As to the title, sure, where you 'use' can make a difference. Moving a 'use' between inside and outside of a subroutine should make very little difference as to when the resulting require and import are called (but, of course, can have an impact on the context in which the import is called, such as with the lexically scoped pragmas such as strict.pm).
So I don't see how what you described would happen. Of course, you show no code so I'm forced to imagine what you are doing. So I suspect that my imagination is failing me in its reconstruction of your situation rather than failing me in figuring out how the situation gives the described results. So you might want to produce a minimal test case that reproduces the problem so I don't have to imagine that part.
- tye
|
|---|