First, lexical variables cannot be exported. Use our $test="hello" instead.
Secondly, the name Config is somewhat unfortunate, because there's a core module of the same name, which you will likely load instead of your own...
Update: to elaborate on the latter point: the use lib "$FindBin::Bin"; doesn't achieve the desired effect here, because use lib itself already loads Config.pm, so your own subsequent use Config just does nothing, because the (core) module is already loaded. In theory, you could work around that problem (in this particular case) by saying
BEGIN { unshift @INC, $FindBin::Bin }
but it's probably a better idea to choose a different name, in order to avoid such pitfalls right from the start... (What if some other module you load later should need the core module's functionality after you've successfully manoeuvred your own module into the Config namespace?)
In reply to Re: Exporter problem
by almut
in thread Exporter problem
by saintex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |