Tcl Library Source Code

View Ticket
Login
Ticket UUID: 8ab3be2e6a1776e8a813d8b96d53407a2c3bf222
Title: list command overwrites $plugin variable
Type: Bug Version:
Submitter: juliannoble2 Created on: 2025-10-05 07:46:54
Subsystem: pluginmgr Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2025-10-05 07:46:54
Resolution: None Closed By: nobody
    Closed on:
Description:
calling 'objectName list' will overwrite the instance variable $plugin with the last entry in the returned list

e.g if a pattern is specified that returns multiple plugins, the last one will be asssigned to $plugin.
This means a subsequent call to 'objectName plugin' can return the wrong name.

This seems to be a result of using plugin for the capture variable in the list method:

  foreach p [$sip eval {package names}] {
      if {![regexp $pattern $p -> plugin]} continue
      lappend result $plugin
  }