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

Products: Gossamer Links: Development, Plugins and Globals: Re: [Andy] Question : Lots of globals, or a main plugin?: Edit Log

Here is the list of edits for this post
Re: [Andy] Question : Lots of globals, or a main plugin?
It won't make any difference I imagine. A global function such as:

sub { return ... }

...is just the same as:

Plugins::Andy::xyz

...except the former is anonymous. Both need to be compiled either way. The only performance hit would be loading the module for the first time.

A little trick to speed things up is to do....

Code:
use GT::AutoLoader;

$COMPILE{my_function} = __LINE__ . <<COMPILE;
sub my_function {
#------------------------------------------------------------------------
# This function will be compiled on demand.

...

}
COMPILE

Last edited by:

Hargreaves: Dec 5, 2005, 9:58 AM

Edit Log: