[snip]
% my @old_body = split(/\b/, $old_body);
% my @new_body = split(/\b/, $new_body);
% my $diff = Algorithm::Diff->new(\@old_body, \@new_body);
% while ($diff->Next()) {
% if ($diff->Diff()) {
% foreach ($diff->Items(1)) {
<% display_pre($_) %>
% }
% foreach ($diff->Items(2)) {
<% display_pre($_) %>
% }
% } else {
% foreach ($diff->Same()) {
<% display_pre($_) %>
% }
% }
% }
[snip]
####
%Time ExclSec CumulS #Calls sec/call Csec/c Name
47.5 46.88 46.888 123881 0.0000 0.0000 Algorithm::Diff::_replaceNextLarge
rWith
17.3 17.05 64.094 1 17.056 64.093 Algorithm::Diff::_longestCommonSub
5 sequence
0.31 0.304 0.304 16299 0.0000 0.0000 HTML::Mason::Request::print
0.16 0.153 64.717 1 0.1528 64.716 HTML::Mason::Request::call_next
0.11 0.106 0.154 5418 0.0000 0.0000 HTML::Mason::Commands::BEGIN
0.09 0.086 0.101 1 0.0855 0.1010 Algorithm::Diff::_withPositionsOfI
nInterval
0.07 0.070 0.070 3 0.0233 0.0233 HTML::Mason::Interp::apply_escapes
0.06 0.063 0.063 8911 0.0000 0.0000 Algorithm::Diff::__ANON__
0.05 0.050 0.060 7 0.0072 0.0086 HTML::Mason::Request::comp
0.04 0.038 0.038 5394 0.0000 0.0000 HTML::Entities::encode_entities
0.03 0.030 64.947 1 0.0301 64.947 HTML::Mason::ApacheHandler::handle
1 r
0.03 0.030 64.124 1 0.0300 64.123 Algorithm::Diff::LCSidx
0.02 0.020 0.020 1 0.0200 0.0200 DBI::connect
0.01 0.010 0.010 9 0.0011 0.0011 vars::import
0.01 0.010 0.010 1 0.0100 0.0100 Apache::Session::DESTROY