The function is
UnitClass() and
classFileName is usually the English name in all caps. The function also has a 3rd return since MoP that returns an index number related to what class the unit is.
On another note, if the entire addon is in one file, you could use
return to stop execution of the file if in the main chunk.
Lua Code:
local _,class,id=UnitClass("Player");
-- You can use either of these, they both point to the same class
if class=="PRIEST" then return; end
if id==5 then return; end
Class ID is documented
here.
PS: I don't know if glyph data is available immediately at login or if you need to wait for PLAYER_LOGIN to fire.
You should still load even if you don't detect the glyph initially as glyphs can be changed by the player while logged in. Perhaps put the addon into a sleep state until it sees the glyph by login, spec change, or glyph swap.