#!/usr/bin/env perl use Benchmark qw( timethese ); use Courriel; use Email::MIME; my $text = <<'EOF'; From autarch@gmail.com Sun May 29 11:22:29 2011 MIME-Version: 1.0 Date: Sun, 29 May 2011 11:22:22 -0500 Message-ID: Subject: Testing From: Dave Rolsky To: Dave Rolsky Content-Type: multipart/alternative; boundary=20cf3071cfd06272ae04a46c9306 --20cf3071cfd06272ae04a46c9306 Content-Type: text/plain; charset=ISO-8859-1 This is a test email. It has some *bold* text. --20cf3071cfd06272ae04a46c9306 Content-Type: text/html; charset=ISO-8859-1 This is a test email.

It has some bold text.

--20cf3071cfd06272ae04a46c9306-- EOF sub courriel { my $copy = $text; Courriel->parse( text => \$copy ); } sub email_mime { my $copy = $text; Email::MIME->new(\$copy); } timethese( 5000, { Courriel => \&courriel, 'Email::MIME' => \&email_mime, } );