In the next code, it's not possible to make manipulations in place, because the reference count is greater than 1. Another possibility is that ::tcl::unsupported::representation lies, and shows the pointer of another object.

I am getting this output:
   value is a pure string with a refcount of 4, object pointer at 0x8528378, string representation "data"
   value is a pure string with a refcount of 5, object pointer at 0x8528378, string representation "data"

This is the code:


proc test {} {
    set variable_name data
    puts [::tcl::unsupported::representation $variable_name]
}

test

namespace eval A {
    variable var_A data
    puts [::tcl::unsupported::representation $var_A]

}