Hi

I'm trying to find a solution to the existing problem with

[info script]

that doesn't return meaningful information with mod_rivet but I hit a problem that perhaps demands deeper insights into Tcl internals.

As a first step I decided to filter every call to [::info ...] by renaming the core command and then defining our own ::info procedure. As such the following should work as a transparent replacement

rename ::info ::Rivet::tclcore_info
proc ::info {cmd args} {

    return [::Rivet::tclcore_info $cmd {*}$args]

}

I separated the fist argument because more expressive, it follows the command syntactical structure and it should make natural to execute the test

if { $cmd=="script" } { ...}

in order to return meaningful information. The ::Rivet namespace is meant for Rivet internal usage and it's not documented.

Calling [info <option> ...] in a script or rivet template results in a weird error though

unknown or ambiguous subcommand "exists": must be add, clicks, format, microseconds, milliseconds, scan, or seconds
    while executing
"info exists some_sort_of_variable"
    (in namespace eval "::request" script line 10)
    invoked from within
"namespace eval request {

which seems to suggests I've somehow tampered with some table of commands and info got replaced by [clock...]: anyone has suggestions on how to properly and safely rename core commands?

-- Massimo

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org
For additional commands, e-mail: rivet-dev-h...@tcl.apache.org

Reply via email to