Hi all.
I have the module Vars.pm, that parthes and exports some configuration variables:
#!/usr/bin/perl -w
package Module::Vars;
require 5.004;
require Exporter;
use strict;
use Exporter;
BEGIN
{
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
$VERSION = 0.1;
@ISA = ('Exporter');
@EXPORT = qw(
);
@EXPORT_OK = qw(
$var1
$var2
...
);
}
use vars @EXPORT_OK;
($var1, $var2, ...) = ParthConfig(Some_config_file);
----------------------------------------------------
Then in my script I modefy configuration file [Some_config_file], and need to import from Module::Vars module variables: $var!, $var2. But when I write
require Module::Vars;
Module::Vars->import(qw($var1, $var2, ...));
or
use Module::Vars qw($var1, $var2, ...);
it imports old (not modefied by this script) values of $var1, $var2, ... variables.
I try to use "use autouse" also - the same result.
Thanks.
I have the module Vars.pm, that parthes and exports some configuration variables:
#!/usr/bin/perl -w
package Module::Vars;
require 5.004;
require Exporter;
use strict;
use Exporter;
BEGIN
{
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
$VERSION = 0.1;
@ISA = ('Exporter');
@EXPORT = qw(
);
@EXPORT_OK = qw(
$var1
$var2
...
);
}
use vars @EXPORT_OK;
($var1, $var2, ...) = ParthConfig(Some_config_file);
----------------------------------------------------
Then in my script I modefy configuration file [Some_config_file], and need to import from Module::Vars module variables: $var!, $var2. But when I write
require Module::Vars;
Module::Vars->import(qw($var1, $var2, ...));
or
use Module::Vars qw($var1, $var2, ...);
it imports old (not modefied by this script) values of $var1, $var2, ... variables.
I try to use "use autouse" also - the same result.
Thanks.