CodeText::Perl(3pm)

πŸ“¦
version 0.3.4 Β· 2 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– 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 a Tk::Text like 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 @state to 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 in Tk::CodeText.
  • stateSet(@list) β€” Sets the state of the formatter. Called by the highlighting routines in Tk::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