Tcl Source Code

View Ticket
Login
Ticket UUID: 5c2f6c2ff45c07929b05a005cb741ace119cebbe
Title: info procs/body/args only return already auto_loaded procs
Type: Bug Created on: 2021-01-06 22:37:32
Submitter: fvogel Assigned to: nobody
Subsystem: 38. Init - Library - Autoload Severity: Minor
Priority: 5 Medium Last modified: 2021-01-06 22:37:32
Status: Open Closed by: nobody
Resolution: None Closed on:
Version:
Description:

info procs/body/args only return already auto_loaded procs

Example, from a fresh tclsh session:

% info body tcl_endOfWord
"tcl_endOfWord" isn't a procedure
% tcl_endOfWord "foo bar" 2
3
% info body tcl_endOfWord

    variable ::tcl::WordBreakRE
    set result {-1 -1}
    regexp -indices -start $start -- $WordBreakRE(end) $str result
    return [lindex $result 1]

%

The first time [info body] is invoked, tcl_endOfWord has not yet been auto_loaded. The error output here is a bit surprising from a user point of view.

A documentation fix could perhaps be good enough.