Hi Massimo,

AFAIK, info is implemented as an ensemble.
You can add subcommands just like that.
I am not sure to which TCL version this is true...

-Harald

Am 14.02.2016 um 23:51 schrieb Massimo Manghi:
> 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: [email protected]
> For additional commands, e-mail: [email protected]
> 


-- 
ELMICRON Dr. Harald Oehlmann GmbH
Koesener Str. 85
06618 Naumburg
Germany
Phone: +49 (0)3445 78112-0
Fax: +49 (0)3445 78112-19
www.Elmicron.de
German legal references:
Geschaeftsfuehrer: Dr. Harald Oehlmann, Jens Oehlmann
UST Nr. / VAT ID No.: DE206105272
HRB 212803 Stendal

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to