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

Products: Gossamer Links: Development, Plugins and Globals: Re: [Andy] use global in a global ??: Edit Log

Here is the list of edits for this post
Re: [Andy] use global in a global ??
A global is basically a closure. You can anytime create closure in a global.
You do not need to create nested function, as you showed.

Here it is an example:
Code:
sub {
my $another_closure = sub {
return 1;
}
&$another_test() ? return 1 : return 0;
}

Quote:
..but trying to do it "outside" of the current global, is another matter =)
But originally I meant, that (theoritically, because I never tried) you can even access the $GLOBALS variable within a global, so you can call any of them as a closure.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: Jan 18, 2006, 4:16 AM

Edit Log: