Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: Re: [EZFrag] Calling a global from a global???: Edit Log

Here is the list of edits for this post
Re: [EZFrag] Calling a global from a global???
You can load the globals file, ie:

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.

Last edited by:

Wychwood: May 21, 2008, 1:42 AM

Edit Log: