---
name: "Rex::Hook"
section: "3pm"
platform: "linux"
package: "rex"
version: "1.16.0-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Rex::Hook"
---

# Rex::Hook(3pm)

manage Rex hooks

## NAME

Rex::Hook - manage Rex hooks

## DESCRIPTION

This module manages hooks of various Rex functions.

## SYNOPSIS

```
 use Rex::Hook;
 register_function_hooks { $state => { $function => $coderef, }, };
```

## EXPORTED FUNCTIONS

### register\_function\_hooks { $state =\> { $function =\> $coderef } };

Registers a `$coderef` to be called when `$function` reaches `$state` during its execution.

For example:

```
 register_function_hooks { before_change => { file => \&backup } };
```

`$coderef` may get parameters passed to it depending on the hook in question. See the given hook's documentation about details.
