Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-05
07:39 • Ticket [218622ffff] 'info procs' behavior inconsisten with other info me... artifact: 0404763503 user: dgp
2000-10-26
08:25 • Closed ticket [218622ffff]. artifact: 8e30ea1773 user: welch
01:03 • New ticket [218622ffff]. artifact: 9094799196 user: nobody

'info procs' behavior inconsisten with other info methods

Closed / Fixed218622ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:03:15
OriginalBugID: 1488 Bug
Version: 8.0.4
SubmitDate: '1999-03-11'
LastModified: '2000-01-11'
Severity: LOW
Status: Released
Submitter: pat
ChangedBy: hobbs
RelatedBugIDs: 667
OS: Solaris
Machine: Other
FixedDate: '2000-01-11'
FixedInVersion: 8.3b2
ClosedDate: '2000-10-25'


Name:
Jeffrey Hobbs

ReproducibleScript:
    ## Taken from tkcon console output
    (jhobbs) 1 % namespace eval ::foo {
    set var 1
    proc bar {a {b 0}} { return "$a $b" }
    }
    (jhobbs) 2 % info procs ::foo::*
    (jhobbs) 3 % info vars ::foo::*
    ::foo::var
    (jhobbs) 4 % namespace eval ::foo { info procs }
    bar
    (jhobbs) 5 % info args ::foo::bar
    a b
    (jhobbs) 6 % info args string
    "string" isn't a procedure
    (jhobbs) 7 % info commands ::foo::*
    ::foo::bar

ObservedBehavior:
The above script shows the abherrent behavior of info procs.  This has
been
discussed several times on c.l.tcl, but this shows how alone info procs
is in working the way it does.  Only when run in the namespace eval does
one get info procs to return data.

DesiredBehavior:
I expect info procs to parallel info vars in returning procs even when a
namespace is specified.  One can see that also info args (and other info
commands on procs) operate properly by recognizing the proc in a
namespace.
Line 4 shows the work-around, but this can be quite a bummer to deal with
all the time.  Having just info commands work properly isn't sufficient
in easily identifying whether the "command" is actually a procedure.


8.3b2 solves this. 
-- 01/11/2000 hobbs
welch Closed ticket [218622ffff]. [History diff]2000-10-26 08:25:11
dgp Ticket [218622ffff]: 3 changes [History diff]2001-04-05 07:39:02
Log in (anonymous is fine) to add a comment.