Home : Gossamer Threads Inc. : Discussion :

Gossamer Threads Inc.: Discussion: Plugin System: Edit Log

Here is the list of edits for this post
Plugin System
Sorry if this is the wrong place for this post. It isn't totally product specific so I thought here was ok.

Anyway, I notice that the way plugin hooks are run sometimes varies from:

GT::Plugins->dispatch($CFG->{admin_root_path} . '/Plugins', \&sub_routine);

...to...

GT::Plugins->dispatch($CFG->{admin_root_path} . '/Plugins', \&sub_routine, $args);

...to....

GT::Plugins->dispatch($CFG->{admin_root_path} . '/Plugins', sub { return sub_routine($args) }, $args);

I was just wondering what the reason for the difference was.

At first I thought it was to do with passing in arguments to the function but $args is passed into the sub routine whichever way you call it due to how the code ref is compiled in GT::Plugins.

I've got a feeling that this will turn out to be a really dumb question Blush

Last edited by:

Paul: Oct 2, 2002, 10:32 AM

Edit Log: