in reply to Re^3: "use" modules inside modules
in thread "use" modules inside modules
$ntCapabitilies needs to be declared using our if you want to share its data between modules. The function is working presumably because it was defined in the same namespace as $ntCapabilities and hence can see its data. The accessor method is in a different namespace (Octopus?) and so can't see its data, even if you import the name. into the other namespace. This is because the imported variable is a package ("our") variable rather than a lexically scoped ("my") variable. All your values were assigned to the "my" variable, not the "our" variable.
Two other points:
One really should use warnings, not just strict. If you don't like all the warnings that use warnings; spews out, then clean up the code that is causing them. Getting rid of it to quiet the warnings is only going to cause you a world of trouble. If you have a very specific reason to do something normally warned about (e.g. you need to munge the symbol table), then turn off a specific warning for a specific block. Turning of warnings globally is a bad idea. Someone is paying you a lot of money to develop this code. It is important to give yourself every chance possible to catch mistakes.
You and your team could have done a much better job of reducing this code to the essentials than you did. For example,
Best, beth
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: "use" modules inside modules
by Bloodnok (Vicar) on Jun 28, 2009 at 20:17 UTC | |
by bogaertb (Novice) on Jun 29, 2009 at 14:15 UTC | |
|
Re^5: "use" modules inside modules
by Anonymous Monk on Jun 29, 2009 at 06:16 UTC | |
by Anonymous Monk on Jun 29, 2009 at 06:36 UTC | |
by bogaertb (Novice) on Jun 29, 2009 at 07:32 UTC |