Thank you, I have done so, but I still have a problem.

I used to run those config files using do() for getting the data based on a
variable, for example:

my $ref = do("$language.ini");

And depending on the value of the $language variable, it is launched a
different .ini file.

I don't know how to get the variable from a module if I know the name of
that module only at runtime.

I have tried:

my $module = "Teddy::ModuleName";
eval "require $module";

But now I don't know how to get the value of $content variable from
Test::ModuleName.

I know that I can get it using $Teddy::ModuleName::content, but I know the
name of that module only at runtime.

I have tried $module::content, but it doesn't work.

Please advice how I can do that.

Thank you.

From: "Michael Peters" <[EMAIL PROTECTED]>
> Just put it into it's own package and preload it. As long as you don't
> change the data it'll stay shared.
>
> package MyConfig;
>
> our %DATA = (
> ...
> );
>
> 1;
>
> Then reference it anywhere as MyConfig::DATA{foo};
>
> HTH
> -- 
> Michael Peters
> Developer
> Plus Three, LP
>

Reply via email to