From 9cda968d5385cb6797d3fc721619a300384c1f3e Mon Sep 17 00:00:00 2001 From: Juerd Waalboer Date: Fri, 3 Dec 2021 01:49:25 +0100 Subject: [PATCH] Document ABORT constant as possible return value from hook This feature was introduced way back in commit add31004. --- lib/RevBank/Plugins.pod | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lib/RevBank/Plugins.pod b/lib/RevBank/Plugins.pod index 0d5917a..02e0ba5 100644 --- a/lib/RevBank/Plugins.pod +++ b/lib/RevBank/Plugins.pod @@ -114,15 +114,9 @@ cart, re-evaluate your assumptions when upgrading! Hooks SHOULD NOT prompt for input or execute programs that do so. -A plugin that exists only for its hooks, MUST still provide a C method. -The suggested implementation for a no-op C method is: - - sub command { - return NEXT; - } - -Hooks are called as class methods. The return value is ignored. Hooks MUST NOT -interfere with the transaction flow (e.g. abort it). +Hooks are called as class methods. The return value MUST be either C, +which causes the ongoing transaction to be aborted, or a non-reference, which +will be ignored. The following hooks are available, with their respective arguments: