More Code 

sub format {
  my($self, $text) = @_;

  return join "\n\n",
         map { $self->format_para($_) } 
         split /\n\n+/, $text;
}

sub format_para {
  my($self, $text) = @_;

  # etc