You can load the globals file, ie:
local $@;
my $globals = do "/path/to/globals.txt" or return "Unable to load globals: $!";
my $out = eval "$globals->{your_other_global}";
return $out->() if (! $@ && ref($out) eq 'CODE') ;
return "Compilation of global failed: $@";
}
The globals file may already be stored in memory so you may not need to load it - there might be a global variable holding it somewhere. I've not checked.
Code:
sub { local $@;
my $globals = do "/path/to/globals.txt" or return "Unable to load globals: $!";
my $out = eval "$globals->{your_other_global}";
return $out->() if (! $@ && ref($out) eq 'CODE') ;
return "Compilation of global failed: $@";
}
The globals file may already be stored in memory so you may not need to load it - there might be a global variable holding it somewhere. I've not checked.