Devel::MAT::Tool(3pm)
β¨ NAME β¨
Devel::MAT::Tool β bestie, this is the plugin zone that lets you extend Devel::MAT π
πΈ DESCRIPTION πΈ
okay so picture this: the Devel::MAT::Tool:: namespace is basically a lil' locker where you stash plugins that level up what Devel::MAT can do. Those tools are how you add extra analysis or extra display powers to the UI, no cap. And how does a tool talk to the UI? By calling methods in the Devel::MAT::UI package. that's the group chat π¬
A tool just drops itself into that namespace and brings along an object class. That's literally it. It does not need to inherit from anything specific β no weird family drama required. And the UI constructs tools lazily, only when the user actually asks for them. lowkey efficient, highkey iconic β¨
π«Ά METHODS π«Ά
These are the methods your tool class should show up with, bestie. Not all of them, but here's the whole menu:
π FOR_UI
$display = CLASS->FOR_UI
If you want your tool sitting pretty on the UI's Tools menu, define this constant method and have it return a true value. that's the vibe check right there π
π CMD
$cname = CLASS->CMD
If your tool has a named command for the commandline, define this constant method and have it return the name. periodt.
π AUTOLOAD_TOOL
$load = CLASS->AUTOLOAD_TOOL( $pmat )
If your tool should get auto-loaded for a given file, define this method to return a true value. When's that useful? say it with me: extra analysis π₯ Like when your tool peeks inside objects of specific classes, and those very classes are found in the file β boom, autoload, slay.
π init_tool
$tool->init_tool()
Does whatever initialisation the tool needs β typically the bulk analysis stuff, run across the entire dumpfile heap. the heavy lifting, fr fr π
π init_ui
$tool->init_ui( $ui )
Asks the tool to set up any UI elements it might need, by calling methods on the $ui you handed it. Heads up: $ui might be an object, or it might just be the package name Devel::MAT::UI directly. both are valid, don't panic π¦
π SVs π
Tools may β and honestly, are encouraged to, where it makes sense β add methods to the Devel::MAT::SV package, so you can grab analysis results or do related lil' activities. π
Here's the tea: all SVs are implemented as blessed HASH references, and tools are allowed to use keys that begin with tool_... inside them. And please namespace your key and method names according to the tool name, because collisions are not the moment. π
π AUTHOR π
Paul Evans <leonerd@leonerd.org.uk>
aaaand that's the whole page bestie!! this one shipped with perl v5.42.3, dated 2026-08-21, filed under User Contributed Perl Documentation. go forth and write iconic tools πβ¨π
π¦ where this page comes from
- ubuntu stonking: libdevel-mat-perl 0.54-1build1 Β· 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