sub preprocess_paragraph { my $self = shift; local($_) = shift; ## See if this is a heading and we arent printing the entire manpage. if (($self->{VERBOSE} < 2) && /^=head/o) { ## Change the title of the SYNOPSIS section to USAGE s/^=head1\s+SYNOPSIS\s*$/=head1 USAGE/o; ## Try to do some lowercasing instead of all-caps in headings s{([A-Z])([A-Z]+)}{((length($2) > 2) ? $1 : lc($1)) . lc($2)}ge; ## Use a colon to end all headings s/\s*$/:/o unless (/:\s*$/o); } return $self->SUPER::preprocess_paragraph($_); }