Gossamer Forum
Home : Products : DBMan SQL : Development, Plugins and Globals :

Question about GT::Plugins::dispatch_method()

Quote Reply
Question about GT::Plugins::dispatch_method()
Hi,

Can anyone explain me why the inner-pre-hook loop of the subroutineGT::Plugins::dispatch_method (line 157 in version 1.43) looks like this:
Code:
if (exists $PLUGIN_CFG->{_pre_hooks}->{$hook_name}) {
$self->debug ("Plugin: pre $hook_name running => $hook")
if ($self->{_debug});
defined &{$hook} or $self->_load_hook ($hook, 'PRE') or next;
$ACTION = CONTINUE;
@results = $hook->($object, @args);
$ACTION == STOP and last;
}
unless ($ACTION == STOP) {
@results = $object->$method(@args);
}

and not like this
Code:
if (exists $PLUGIN_CFG->{_pre_hooks}->{$hook_name}) {
$self->debug ("Plugin: pre $hook_name running => $hook")
if ($self->{_debug});
defined &{$hook} or $self->_load_hook ($hook, 'PRE') or next;
$ACTION = CONTINUE;
@args = $hook->($object, @args);
$ACTION == STOP and last;
}
if ($ACTION == STOP) {
@results = @args;
} else {
@results = $object->$method(@args);
}



Thanks, Jasper

http://www.bookings.org

Last edited by:

jaspercram: Nov 20, 2002, 4:26 AM
Subject Author Views Date
Thread Question about GT::Plugins::dispatch_method() jaspercram 5570 Nov 20, 2002, 4:14 AM
Post Re: [jaspercram] Question about GT::Plugins::dispatch_method()
yogi 5477 Nov 20, 2002, 5:13 AM
Thread Re: [jaspercram] Question about GT::Plugins::dispatch_method()
jaspercram 5422 Nov 21, 2002, 1:26 AM
Post Re: [jaspercram] Question about GT::Plugins::dispatch_method()
Paul 5408 Nov 21, 2002, 2:05 AM
Post Re: [jaspercram] Question about GT::Plugins::dispatch_method()
Alex 5424 Nov 21, 2002, 9:24 AM