CodeText::Perl(3pm)
π CodeText::Perl β a.k.a. Tk::CodeText::Perl (3pm) π
okay so bestie, welcome to the manual page for Tk::CodeText::Perl, a lil plugin that does Perl syntax highlighting. it lives in the User Contributed Perl Documentation section of your friendly neighbourhood man setup, and it is genuinely the moment. π
β¨ NAME β¨
Tk::CodeText::Perl β a Plugin for Perl syntax highlighting π
π¦ SYNOPSIS π¦
Tk::CodeText::Perl inherits Syntax::Highlight::Perl;
heads up bestie: for its limitations see also there (i.e. go read the Syntax::Highlight::Perl page, iykyk). this module provides extra methods to provide syntax highlighting for the Perl programming language. π
π METHODS π
highlight($string);β returns a list of string snippets and tags that can be inserted in aTk::Textlike widget instantly. no waiting, no loading spinner, we go straight in. β¨rules($txtwidget,\@list)β sets and returns a reference to a list of tagnames and options. by default it is set to:
[
['Comment_Normal', -foreground => 'lightblue'],
['Comment_Pod', -foreground => 'lightblue'],
['Directive', -foreground => 'black'],
['Label', -foreground => 'black'],
['Quote', -foreground => 'red'],
['String', -foreground => 'red'],
['Variable_Scalar', -foreground => 'blue'],
['Variable_Array', -foreground => 'blue'],
['Variable_Hash', -foreground => 'blue'],
['Subroutine', -foreground => 'orange'],
['Character', -foreground => 'magenta'],
['Keyword', -foreground => 'darkgreen'],
['Builtin_Operator', -foreground => 'darkgreen'],
['Operator', -foreground => 'brown'],
['Number', -foreground => 'darkblue'],
]
rulesConfigure($txtwidget,\@list)β Used internally. Don't call it yourself. π seriously bestie, it's not for us, it's giving "staff only" door energy. πrulesDelete($txtwidget,\@list)β yeah, also in the rules department, right there with its sibling above. π§stateCompare(\@state);β Compares@stateto the current state of the formatter. returns true when equal. vibe check but for states. πΈstateGetβ Returns a list of the current state of the formatter. Called by the highlighting routines inTk::CodeText.stateSet(@list)β Sets the state of the formatter. Called by the highlighting routines inTk::CodeText. β¨οΈ
π«Ά AUTHOR π«Ά
Hans Jeuken (haje@toneel.demon.nl) β absolute icon, thank you for your service. π
π BUGS π
Propably plenty π (yes, that's exactly how it's written, we keep it verbatim, no cap).
and that's the whole page, bestie! now go forth and highlight some Perl. πβ¨πΈ
cute lil sign-off: this page ships as part of perl v5.40.1, dated 2025-05-04, and it's the CodeText::Perl(3pm) page from the User Contributed Perl Documentation collection. π¦ mwah, go read it again, it's short and it ate. π
π¦ where this page comes from
- debian trixie: libtk-codetext-perl 0.3.4-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtk-codetext-perl 0.3.4-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtk-codetext-perl 0.3.4-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms