in reply to Exporter problem

Declare your variable with our inside your package:
package Config; use strict; use warnings; our (@ISA,@EXPORT,$VERSION,$test); use Exporter; @ISA=qw(Exporter); @EXPORT=qw($test DEFAULT_LOCAL_PATH ); $VERSION=0.01; use constant DEFAULT_LOCAL_PATH=>'something here'; $test='hello'; 1;
That solves your immediate problem. However, you may want to heed the advice in What not to Export:
Exporting variables is not a good idea. They can change under the hood, provoking horrible effects at-a-distance, that are too hard to track and to fix. Trust me: they are not worth it.

Replies are listed 'Best First'.
Re^2: Exporter problem
by saintex (Scribe) on Jun 03, 2010 at 17:08 UTC
    ok, thank you,
    but I have to declare
    another:
    our $test='hello';
    otherwise I have that error:
    Global symbol "$test" requires explicit package name at myFile.pl line + 16. Execution of myFile.pl aborted due to compilation errors.
    Thank you for your advise about exporting variable. I will not export them:
    $test was just a test.
    I will export just some constants, useful to define my environement in whole package