I'm trying to use sub import in a script so in all my modules I can do:
use Module qw/$foo $bar/;
....but it doesn't seem to be working right and I keep getting errors saying that $foo and $bar need an explicit package name. In sub import I create all the objects and don't get errors about that so that seems to be ok, it's just that I don't seem to be able to use the objects in other modules.
Also what is the difference between using that method and @EXPORT_OK?
Thanks.
use Module qw/$foo $bar/;
....but it doesn't seem to be working right and I keep getting errors saying that $foo and $bar need an explicit package name. In sub import I create all the objects and don't get errors about that so that seems to be ok, it's just that I don't seem to be able to use the objects in other modules.
Also what is the difference between using that method and @EXPORT_OK?
Thanks.