exit(3pm)
π NAME π
Tk::exit β end the application, bestie. like, for real for real, shut it down π
β¨ SYNOPSIS β¨
use Tk qw(exit);
...
exit($returnCode);
okay so the $returnCode part is optional β it's a placeholder, not a requirement, iykyk π«Ά
πΈ DESCRIPTION πΈ
This one terminates the process and hands returnCode back to the system as the exit status. That's the whole vibe. If you don't pass a returnCode at all, it just defaults to 0 β no drama, no fuss, classic π
Now here's the slay part: if you're calling exit from code that got invoked via a Tk callback, this Tk version of exit cleans up more reliably than using the plain perl exit. so like, it's giving upgraded exit. it's giving main character cleanup energy. β¨
β οΈ CAVEATS β οΈ
π bestie listen. this one matters.
Using exit from a forked process will terminate both the child process and the parent process. yes, both. the whole family. gone. π
And because Tk::exit is imported by default, you should use CORE::exit in the forked process instead. not exit, CORE::exit. don't mix them up, fr fr π
π KEYWORDS π
exit, process β the tags, the lore, the search terms π
and that's the page!! written by the perl people, from perl v5.40.1, dated 2025-04-13 β ty for coming to my ted talk, mwah πβ¨π
π¦ where this page comes from
- debian trixie: perl-tk 1:804.036+dfsg1-5
- ubuntu questing: perl-tk 1:804.036+dfsg1-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms