#! /usr/bin/env tclsh

package require {ycl proc}
[yclprefix] proc alias [yclprefix]::proc::alias

namespace import [yclprefix]::proc::stub
alias [yclprefix]::proc::stub 

variable doc::name {
	description {
		determine the name of the current routine
	}
}
proc name {} {
	uplevel 1 {::lindex [::info level 0] 0}
}


variable doc::rename {
	description

		like ::rename

			but only resolves the routine in the current namespace
}

stub rename {name args} {
	package require {ycl ns}
	alias [yclprefix]::ns
} {
	if {![string match ::* $name]} {
		set name [ns normalize $name[set name {}] [
			uplevel 1 {namespace current}]]
		set found [namespace which $name]
	}
	::rename $name {*}$args
}
