in reply to Re^2: I just want to include another file
in thread I just want to include another file
I also think when I did create modules that I used a simplified approach of not doing "export"s at all. The "use" still worked the same, but to refer to variables in the module I had to use the module name, something like this:
Again, not sure if this is exactly right, but it should be close. I liked this approach because looking at the code you can always tell *where* a variable comes from - you don't need to go hunting around for it if you see that it hasn't been declared in the current module. You *are* using warnings(-w), strict, and declaring all your variables with "my", right??use lib '/path/to/my/module/directory'; use MyMod; print "MyMod var1 value is $MyMod::var1\n";
HTH.
|
|---|