Defined in
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
-
No testcase defined.
Source code:
set absolute [expr {[string first :: $name]==0 ? $name : "::$name"}]
set command [namespace which -command $absolute]
if {$command ne {} && ![catch {
info body $command
} body]} {
set arguments {}
if {[catch {
info args $command
} formals]} {
set native [::nx::Object info method definition ::nsf::procs::$command]
set arguments [lindex $native end-1]
set doc [codeMetadata $command]
if {$doc eq {}} {
set doc [codeMetadata [string trimleft $command :]]
}
if {[dict exists $doc arg_list]} {
set arguments [dict get $doc arg_list]
}
} else {
foreach arg $formals {
if {[info default $command $arg default]} {
lappend arguments [list $arg $default]
} else {
lappend arguments $arg
}
}
}
return [dict create kind tcl definition [list proc $command $arguments $body]]
}
if {[catch {
llength $name
} length] || $length!=3} {
error "Definition unavailable in this interpreter"
}
lassign $name object tag member
if {$tag ni {proc instproc} || ![nsf::is object $object]} {
error "Definition unavailable in this interpreter"
}
set scope [expr {$tag eq "instproc" ? "class" : "object"}]
if {$scope eq "class" && ![nsf::is class $object]} {
error "Definition unavailable in this interpreter"
}
set api ::nsf::methods::${scope}::info::method
set definition [nsf::directdispatch $object $api definition $member]
if {$definition eq {}} {
error "Definition unavailable in this interpreter"
}
set kind [expr {[nsf::is object,type=::nx::Object $object] ? "nx" : "xotcl"}]
return [dict create kind $kind definition $definition]
XQL Not present:Generic, PostgreSQL, Oracle