You need to create the "player" entry as a table
Lua Code:
local _, ns = ...
ns["player"] = {}
ns["player"].name = UnitName("player")
Then in exp2.lua
Lua Code:
ns["player"].class = "WARRIOR"
You can also get rid of the [""]
Lua Code:
ns.player = {}
ns.player.name = UnitName("player")
Then again, I could be about to learn something new.