Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f8efa3897e5c2e790e7ca95e646869a6d1e811b0
Ticket: 218060ffffffffffffffffffffffffffffffffff
info commands return value altered by execution of command i
User & Date: nobody on 2000-10-26 00:52:41
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 1507 Bug
    Version: 8.0.3
    SubmitDate: '1999-03-15'
    LastModified: '1999-11-10'
    Severity: SER
    Status: Closed
    Submitter: pat
    ChangedBy: hobbs
    OS: Windows NT
    OSVersion: 4.0 SP4
    Machine: X86
    FixedDate: '2000-10-25'
    ClosedDate: '1999-11-10'
    
    
    Name:
    Bruce Adams
    
    ReproducibleScript:
    proc putList { channel list { entryFormat "%s" } } {
        foreach item $list {
            puts $channel [ format $entryFormat $item ]
        }
    }
    # End Proc putList
        
    namespace eval fred {
    }
    
    puts "==========="
    
    rename info ::fred::info_builtin
    proc info { subcommand args } {
        return [eval ::fred::info_builtin $subcommand $args]
    }
        
    puts "BEFORE:"
    putList stdout "[ info commands inf* ]"
    
    proc info { subcommand args } {
    # each of the following has the same effect
        return [namespace eval ::fred info_builtin $subcommand $args]
        #return [namespace eval ::fred ::fred::info_builtin $subcommand $args]
        #return [namespace inscope ::fred ::fred::info_builtin $subcommand $args]
    }
    
    puts "AFTER:"
    putList stdout "[ info commands inf* ]"
    
    info_builtin
    
    ObservedBehavior:
    info_builtin is wrongly reported as existing in the global namespace by
    [ info commands inf* ] when it does not exist. i.e.
       info
       info_builtin
    
    DesiredBehavior:
    info commands inf*
    should only return "info"
    in the above script
    
    
    This behaviour impacts the development of my introspection package which
    amongst other things extends the semantics of info, through redefining
    it and
    creating a wrapper.
    --
    
    This is actually the correct behavior.  You are evaluating the
    info command now in the ::fred namespace, which means that it
    will pick up its new self as info_builtin.  Add the procs ::fred::inf
    ::fred::inf1 ... and you will see them all. 
    -- 11/10/1999 hobbs
    
  4. foundin changed to: "obsolete: 8.0.3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to:
    info commands return value altered by execution of command i
    
  11. type changed to: "Bug"