---
name: "Dpkg::Exit"
section: "3perl"
platform: "linux"
package: "dpkg"
version: "1.23.11-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/Dpkg::Exit/3perl"
---

# Dpkg::Exit(3perl)

program exit handlers

## NAME

Dpkg::Exit - program exit handlers

## DESCRIPTION

The Dpkg::Exit module provides support functions to run handlers on exit.

## FUNCTIONS

- push\_exit\_handler($func)

  Register a code reference into the exit function handlers stack.

- **pop\_exit\_handler()**

  Pop the last registered exit handler from the handlers stack.

- **run\_exit\_handlers()**

  Run the registered exit handlers.

## CHANGES

### Version 2.00 (dpkg 1.20.0)

Hide variable: `@handlers`.

### Version 1.01 (dpkg 1.17.2)

New functions: **push\_exit\_handler()**, **pop\_exit\_handler()**, **run\_exit\_handlers()**

Deprecated variable: `@handlers`

### Version 1.00 (dpkg 1.15.6)

Mark the module as public.
