tkvars(3pm)

πŸ’– tkvars β€” like, the variables Tk just uses, bestie πŸ’–

okay so this is the perl/Tk page, tkvars(3pm), from the User Contributed Perl Documentation corner of the world. it's short, it's iconic, it's giving "reference card you actually read". sit down, grab a boba, and let's go through every single variable because we do not skip. 🫢


✨ NAME ✨

Tk::tkvars β€” the variables that Tk either sets or uses. that's it, that's the whole vibe. πŸ‘‘


🌸 DESCRIPTION 🌸

the following perl variables are either set or used by Tk at various times while it's doing its thing. (and if you want the list of variables that perl itself uses, go peek at perlvar, bestie.) πŸ’…

  • $Tk::library β€” this one holds the file name for a directory that contains the modules related to Tk. those modules include an initialization file that normally gets processed whenever a Tk application starts up, plus other files with procedures that implement default behaviors for widgets. the initial value of $Tk::library gets set when Tk is added to an interpreter, and that happens by searching for a directory named Tk in the directory where the file Tk.pm lives, or the first directory Tk in @INC.

the TK_LIBRARY environment variable that Tcl/Tk uses is not supported by perl/Tk. no cap. please use @INC to change where modules are searched instead. πŸ™ˆ

Note: this is a Tcl remnant. with perl it makes way more sense to use @INC and %INC.
  • $Tk::patchLevel β€” contains a decimal integer giving the current patch level for Tk. the patch level gets incremented for each new release or patch, and it uniquely identifies an official version of Tk. ⭐
Note: this is a Tcl remnant. with perl it makes more sense to use $Tk::VERSION described below.
  • $Tk::strictMotif β€” this variable is set to zero by default. if an application sets it to one, then Tk attempts to adhere as closely as possible to Motif look-and-feel standards. for example, active elements like buttons and scrollbar sliders will not change color when the pointer passes over them. so, like, zero hover glow-up. very demure. πŸŽ€
  • $Tk::VERSION β€” this variable holds the current version number of the perl/Tk release in the form major.minor. major and minor are integers.

the major version number shows which Tcl/Tk release perl/Tk is based on. e.g., 402 means based on Tcl's Tk 4.2. (patchlevels of Tcl's Tk are not incorporated because perl/Tk tended to be "ahead" of them on some fixes and behind on others. the first digit of the major version number increases in any Tk release that includes changes that are not backward compatible β€” i.e. whenever existing perl/Tk applications and scripts may have to change to work with the new release. 😭)

the minor version depends on perl/Tk only. it uses the 'even'='stable', 'odd'='experimental' scheme that linux uses:

 .0xx  - inherently 'alpha'
 .1xx  - experimental 'beta'
 .2xx  - stable
 .3xx  - experimental
 .4xx  - stable
 ...

the minor version number increases with each new release of Tk, except that it resets to zero whenever the major version number changes. she's got rules, okay? πŸ’…

  • $Tk::version β€” this variable holds the current version number of the Tk library in the form major.minor. major and minor are integers. the major version number increases in any Tk release that includes changes that are not backward compatible β€” i.e. whenever existing Tk applications and scripts may have to change to work with the new release. the minor version number increases with each new release of Tk, except that it resets to zero whenever the major version number changes.
Note: this is a Tcl remnant. with perl it makes more sense to use $Tk::VERSION described above.

πŸ”₯ KEYWORDS πŸ”₯

variables, version


and that's the whole page, bestie β€” every single variable, every note, every tiny caveat, all present and accounted for. not one detail ghosted. πŸ’œ

this gem was served up by perl v5.40.1, dated 2025-04-13, and it lives at tkvars(3pm). mwah, go forth and check your versions. πŸ¦‹βœ¨

πŸ“¦ where this page comes from