Joshua Perry, 28, admitted manslaughter on the grounds of diminished responsibility.