ported some lines from PODRenderer of Mojolicious