1Rex::Hook(3) User Contributed Perl Documentation Rex::Hook(3)
2
3
4
6 Rex::Hook - manage Rex hooks
7
9 This module manages hooks of various Rex functions.
10
12 use Rex::Hook;
13
14 register_function_hooks { $state => { $function => $coderef, }, };
15
17 register_function_hooks { $state => { $function => $coderef } };
18 Registers a $coderef to be called when $function reaches $state during
19 its execution.
20
21 For example:
22
23 register_function_hooks { before_change => { file => \&backup } };
24
25 $coderef may get parameters passed to it depending on the hook in
26 question. See the given hook's documentation about details.
27
28
29
30perl v5.32.1 2021-03-06 Rex::Hook(3)