Stupidity on my part seems to have been the issue here - I forgot that | is a control code to WoW's text displays, and therefore to display it, I need to use two - just one and then leaving out the rest of a control code causes a silent error.
Try this one (tested and working while sitting around in Ironforge on my bankguild-alt)
function(unit, cache, textframe)
local name = UnitName(unit) or unit
name = name:gsub('(%S+) ',function(t) return t:sub(1,1)..'.' end)
local perchp = 100 * UnitHealth(unit) / UnitHealthMax(unit)
return "%s || %.0f%%",name,perchp