I have given a file testconf.pm , with nothing else in it but
my $item = {
'default' => {
'General' => { 'item1' => 'config1',
'item2' => 'config2'
}
}
};
In a second file main.pl , i want to load the hash for next processing steps, I tried some stuff like
use testconfig;
use Data::Dumper;
my $config;
$config = testconfig::item;
print Dumper $config;
But i could not get to use the data from testconf. Unfortunately, i am not able to extend testconf.pm with an exporter or a packagedeclaration, using our instea of my and so on, as this file has to stay like this. How could i get the values out of item in main.pl (btw. i Need to Access the data, not only Dumping it )