Fix typo
perl: Cleanup whitespace
perl: Use correct class names and signatures in documentation

Also refactor parameter list handling a bit.