Iterating through all units for every call doesn't look too efficient, does it?
There's something else crossing my mind given my global reference, how about this:
Code:
local v = _G['oUF_'..unit]
if v then oUF_Nivaya:UpdateNamePos(v, unit) end
It's still global but it would at least allow me to use the unit parameter.
**edit:
Btw. what's the exact difference between oUF.units, oUF.objects and oUF.elements?