in reply to perldoc code only

AFAIK there is no switch to get what you want.

Try the following:

perldoc -m MyModule | perl -n -e " next if (/^=/ .. /^=cut/); print"
It does roughly what you want. It is a quick oneliner, so no error checking and such.