Dpkg::Exit(3perl)

πŸ’… Dpkg::Exit β€” bestie, this is the libdpkg-perl page, section 3perl

Okay so picture this: your program is about to dip out πŸ‘‹ and you've got stuff that has to happen before it goes. That's literally this module. It's the little friend group that makes sure everything gets cleaned up on the way out the door. We're talking program exit handlers, and it's giving responsible main character energy.


✨ NAME ✨

Dpkg::Exit β€” program exit handlers, periodt πŸ’–


🌸 DESCRIPTION 🌸

So the Dpkg::Exit module is the one that provides support functions to run handlers on exit. That's it, that's the vibe β€” you register stuff, and when the program bails, those functions get run. No cap, this is the whole module's job 🫢


πŸŽ€ FUNCTIONS πŸŽ€

  • push_exit_handler($func) β€” register a code reference into the exit function handlers stack. Like adding your bestie to the group chat so they get all the updates ✨
  • pop_exit_handler() β€” pop the last registered exit handler from the handlers stack. Bye bitch, you're off the list πŸ’…
  • run_exit_handlers() β€” run the registered exit handlers. This is the moment everything goes down, the finale, the season-ender πŸ‘‘

πŸ¦‹ CHANGES πŸ¦‹

Version 2.00 (dpkg 1.20.0)

  • Hide variable: @handlers. It's giving mysterious, it's giving private, it's giving "don't touch my stuff" πŸ™ˆ

Version 1.01 (dpkg 1.17.2)

  • New functions: push_exit_handler(), pop_exit_handler(), run_exit_handlers() β€” the holy trinity arrived 🌈
  • Deprecated variable: @handlers β€” okay so it's still there, but it's lowkey on its way out, so heads up ⚠️

Version 1.00 (dpkg 1.15.6)

  • Mark the module as public. She's official, she's out in the world, she's iconic πŸ‘‘

Real talk though: the deprecation on @handlers is for real, so don't be out here building new stuff on top of it bestie. The functions are the way to go πŸ’œ

And that's the page! Sending you off with the very important metadata: this was the 1.23.11-dirty era, dated 2026-09-09, and yes we are still on Dpkg::Exit(3perl) because some things never change πŸ’–βœ¨πŸ“ Go forth and register those handlers, you gorgeous nerd πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from