Tickit::Debug(3pm)
π¦ Tickit::Debug β debug logging support for Tickit, bestie
okay so real quick, the manual name situation: this page lives in User Contributed Perl Documentation, and the module itself is Tickit::Debug. slay, let's get into it π
β¨ NAME β¨
Tickit::Debug β debug logging support for Tickit, no cap π«Ά
πΈ DESCRIPTION πΈ
This module implements the debug logging logic for Tickit. It's controlled by a bunch of environment variables (literally, the whole vibe check happens in env vars). It exports a constant called DEBUG which will be true if the debug logging is enabled β which means your code can efficiently skip over it if it isn't. iconic behavior, honestly π
Debug messages themselves each have a flag name, which is a short string identifying the Tickit subsystem or kind of event that caused it. A given subset of these flags can be enabled for printing. Flags not enabled will not be printed. that's it, that's the rule β¨
π― FLAGS π―
Each flag name starts with upper-case letters indicating the subsystem it relates to, then lower-case letters to indicate the particular kind of event or message. iykyk π₯
π B (RenderBuffer) π
Bdβ Drawing operationsBfβ FlushingBsβ State stack save/restoreBtβ Transformations (translate, clip, mask)
π§ I (Input) π§
Ikβ Keyboard eventsImβ Mouse eventsIrβ Resize events
π¦ W (Window) π¦
Wdβ Rectangles of damage queued on the root window for re-exposeWhβ Hierarchy changes on Windows (creates, deletes, re-orderings)Wsβ Calls to$win->scrollrectWsrβ Calls to$term->scrollrecton the root window as part of scrollrectWxβ Expose events on Windows; which may result in calls to itson_exposehandler. As this event is recursive, it prints an indent. (recursive event? she's doing a little stair-step, we love the indent π«)
π ENVIRONMENT π
β TICKIT_DEBUG_FLAGS β
A comma-separated list of the flags or flag categories to enable for printing. Each potential flag exists in a category, given by the leading upper-case letters of its name. Entire categories can be enabled by name, as can individual flags. so you can be all "give me everything in W" or all "just Wx please" π
See the FLAGS list above for the available flags.
π TICKIT_DEBUG_FD π
If set, debug logging is sent directly to the opened filehandle given by this file descriptor number, rather than opening a log file.
Typically this is most useful to start a Tickit-based application in a new terminal but have its debug logging printed to STDERR of the original terminal the new one was launched from. For example:
$ TICKIT_DEBUG_FD=3 TICKIT_DEBUG_FLAGS=... $TERM perl my-tickit-app.pl 3>&2
This requests that Tickit::Debug log to file descriptor 3, which has been created by copying the original shell's standard error output, and so logging is printed to the shell this was run from. big main character energy from fd 3 honestly π
π TICKIT_DEBUG_FILE π
Gives the name of a file to open and write logging to, if TICKIT_DEBUG_FD is not set. If this is not set either, a filename will be generated using the PID of the process, named as:
tickit-PID.log
π METHODS π
π log π
Tickit::Debug->log( $flag => $format, @args )
Prints a line to the debug log if the specified $flag is present in the set of enabled flags.
Any arguments that are CODE references are called and replaced by the list of values they return, then the line itself is generated by calling sprintf using the format string and the given arguments. It is then printed to the log, prefixed by the flag name and with a linefeed appended. lazy-evaluated code refs? we love efficiency fr fr π
It is not necessary to include the"\n"linefeed in the$formatitself. don't do it, she already adds it for you π
π AUTHOR π
Paul Evans <leonerd@leonerd.org.uk>
and that's the whole page, bestie π this was Tickit::Debug(3pm) from User Contributed Perl Documentation, perl v5.42.3, dated 2026-08-19 β go forth and log, and remember: flag check passed, periodt πβ¨
π¦ where this page comes from
- ubuntu stonking: libtickit-perl 0.73-1build5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms