[Bast-commits] r6094 - ironman/plagger/lib/Plagger
penfold at dev.catalyst.perl.org
penfold at dev.catalyst.perl.org
Fri May 1 15:27:21 GMT 2009
Author: penfold
Date: 2009-05-01 16:27:21 +0100 (Fri, 01 May 2009)
New Revision: 6094
Modified:
ironman/plagger/lib/Plagger/Text.pm
Log:
Error checking patch in Text.pm
Reformat footer a bit.3
Modified: ironman/plagger/lib/Plagger/Text.pm
===================================================================
--- ironman/plagger/lib/Plagger/Text.pm 2009-05-01 15:27:01 UTC (rev 6093)
+++ ironman/plagger/lib/Plagger/Text.pm 2009-05-01 15:27:21 UTC (rev 6094)
@@ -72,7 +72,12 @@
my $html_truncate = HTML::Truncate->new(repair=>1);
$html_truncate->chars($length);
- return $html_truncate->truncate($self->html);
+ my $truncated = eval { $html_truncate->truncate($self->html) };
+ if ($@) {
+ warn "Truncate failed: $@";
+ return $self->html;
+ }
+ return $truncated;
}
sub serialize {
More information about the Bast-commits
mailing list