Fire! Fire!
Yeah, Friday was like that! Tweaking configurations for 200 desktops to work with the new mail server, the president decides to work from home (and he lost his WiFi card so he's using dialup, and he's never consciously deleted any message from his Inbox), and then AT&T's local phone network suffers a multistate outage. Arggghhhhh...
That should probably be:
sub vrfy { my $self = shift; my ($rc, $msg) = $self->run_hooks("vrfy"); if ($rc == DONE) { return 1; }
...<snip>...
Since that code is mostly common to the beginning of almost all of the commands, it looks fine. It also stinks of something that should be abstracted out of all code and replaced with something like:
my ($rc, $msg) = $self->manage_hooks(
hook => "vrfy",
DENY => "Access Denied",
OK => "User OK",
);
# handle any remaining unmapped rc's that require
# additional communcation with remote client or other processingThis way, in the few cases where the plugin has done whatever needs doing, the manage_hook code can immediately deal with it and move on (using the hash values if no $msg was returned from the plugin). This should be generic enough to deal with all of the commands (only bind the $rc's that can be dealt with by an immediate response).
John
