Devel::MAT::UI(3pm)

✨ NAME ✨

Devel::MAT::UI β€” the glow-up pack that lets you extend the user interface of a Devel::MAT explorer πŸ’…

(It's the Devel::MAT::UI(3pm) page, straight out of the User Contributed Perl Documentation, if you were wondering where we are 🫢)


🌸 DESCRIPTION 🌸

Okay bestie, listen. This is a virtual package. Not me being dramatic β€” it literally does not exist in a real .pm file. It's a vibe, not a file. ✨

What it actually is: a bundle of methods that Devel::MAT::Tool classes can call to extend the user interface that a Devel::MAT explorer program gives you. Instead of living in a real module, the methods are supposed to be provided directly by the explorer program. So a tool class can just… call them. No setup, no incantation, no nothing. It can rely on them being there.

🚨 Do not attempt to use Devel::MAT::UI. Bestie. Don't. There's nothing there to load. That's the whole point. 😭

πŸ‘‘ METHODS πŸ‘‘

πŸŽ€ register_icon

Devel::MAT::UI->register_icon( name => $name, ... )

A tool can call this to register a named icon image with the UI, so it can be used later in an SV list column or an SV detail. The icon's name comes from the name key, and the actual UI implementation will pick one of the other keys to get the value for its own type. πŸ¦‹

This icon is what gets used by SV list columns or SV details where the type is icon. The value you set is the name the icon was registered with.

  • svg => PATH (GTK) β€” gives a path name to an SVG file containing the image data. This path is relative to the share directory of the package, managed by File::ShareDir.

🧚 provides_radiobutton_set

Devel::MAT::UI->provides_radiobutton_set( @buttons )

A tool can call this to declare that it wants a set of radiobuttons as a choice of options, shown up in the toolbar of the user interface. Each button gets specified as a HASH reference inside the @buttons list, and each of those hashrefs holds these keys: πŸ’–

  • text => STRING β€” the text to display on the button
  • icon => STRING β€” the name of the previously-registered icon to display with the button
  • tooltip => STRING β€” descriptive text to associate with the button, to explain it a bit more
  • code => CODE β€” a code reference to invoke when the button gets activated

The buttons show up in a group of their own, so selecting one deactivates all the others in the same set. One at a time, periodt. πŸ”₯


🌈 provides_svlist_column

$column = Devel::MAT::UI->provides_svlist_column( type => ..., title => ... )

A tool can call this to declare that it wants to provide a brand new column to display in the main SV list on the user interface. It hands you back an opaque column value, and you should pass that to set_svlist_column_values to actually feed data into the column. πŸŽ€

  • type => STRING β€” the type of the column. This may be int, text or icon.
  • title => STRING β€” the title to display in the column header.

πŸ’œ COLUMN_TYPE, COLUMN_ADDR, COLUMN_DESC, COLUMN_SIZE, COLUMN_BLESSED, COLUMN_OUTREFS, COLUMN_INREFS

Opaque column values that represent the predefined SV list columns. The OGs. πŸ‘‘


πŸ¦‹ set_svlist_column_values

Devel::MAT::UI->set_svlist_column_values( column => $column, from => $from )

A tool can call this to hand over the values to display in the SV list column it created earlier by calling provides_svlist_column β€” or to replace the values in any of the predefined columns. Yes, you can absolutely redo the classics. ✨

  • column => SCALAR β€” the value returned from provides_svlist_column.
  • from => CODE β€” a function to generate the value to store for each SV. It gets invoked with each SV in the SV list, and it should return the value to set in the column.
$value = $from->( $sv )

πŸŽ€ provides_sv_detail

Devel::MAT::UI->provides_sv_detail( type => $type, title => $title, render => $render )

A tool can call this to declare that it provides a section of detail about an SV. Tell me more, tell me more πŸ’–

  • type => STRING β€” the type of the column. This may be widget, text or icon.
  • title => STRING β€” the title to display alongside the detail cell on the main SV display pane.
  • render => CODE β€” a function to generate the display for a given SV address. It gets invoked with an SV to display, and it should give back a value whose meaning depends on the type. If it returns undef, then the row is not displayed for this SV.
$value = $render->( $sv )

If the type is widget, then any of the following make_* methods can be used by the render function to generate a widget to display. 🧚


🫢 make_widget_text

$widget = Devel::MAT::UI->make_widget_text( $text )

Constructs a widget displaying a fixed text string. Simple, clean, iconic.


🌸 make_widget_text_icon

$widget = Devel::MAT::UI->make_widget_text_icon( $text, $icon )

Constructs a widget displaying a fixed text string next to an icon. Text plus icon = the cutest little combo, no cap. πŸ’…


⭐ make_table

$widget = Devel::MAT::UI->make_table( $label => $widget, $label => $widget, ... )

Constructs a widget displaying a labeled table of other widgets. It's widgets all the way down, bestie. πŸ¦‹


πŸ”₯ current_sv

$sv = Devel::MAT::UI->current_sv

If the UI has a concept of the "current" SV that the user is viewing, this method returns it. Tools can use it to pick a default SV to operate on, in case nobody supplied one on the commandline. Main character SV energy. πŸ‘‘


πŸ’– AUTHOR πŸ’–

Paul Evans <leonerd@leonerd.org.uk>


And that's the whole page, bestie β€” you ate that πŸ“ This was perl v5.42.3, dated 2026-08-21, and yes, it's Devel::MAT::UI(3pm) from the User Contributed Perl Documentation. Stay iconic, go read some more manpages, mwah πŸ’œβœ¨

πŸ“¦ where this page comes from