Skip Menu |

This queue is for tickets about the Text-Autoformat CPAN distribution.

Report information
The Basics
Id: 12781
Status: new
Priority: 0/
Queue: Text-Autoformat

People
Owner: Nobody in particular
Requestors: psinnottie [...] aol.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: autoformat dies when mail => 1 and all content is in signature
Text-Autoformat-1.13 perl, v5.8.4 built for i386-linux-thread-multi Linux debian 2.4.27-2-686 #1 Thu Jan 20 11:10:41 JST 2005 i686 GNU/Linux If @paras is empty when line 410 is reached then an invalid entry is created for $paras[0]. my $gap = $paras[0]->{empty} ? 0 : $args{gap}; then line 424 my $hlen = $para->{hanglen} || $para->{hang}->length; fails with Can't call method "length" on an undefined value at /usr/local/share/perl/5.8.4/Text/Autoformat.pm line 424. The test case attached is a mail/newsgroup posting where only the article it being wrapped and the article consists of only a signature so should not be too common but the result is quite severe.
#!/usr/bin/perl -w use strict; use warnings; use Text::Autoformat; my $a = "--\nsig\n"; print $a . "\n\n"; $a = autoformat($a , {"mail"=>1}); print $a . "\n\n";
Date: Sat, 14 May 2005 12:24:17 +1000
From: Damian Conway <damian [...] conway.org>
To: bug-Text-Autoformat [...] rt.cpan.org
Subject: Re: [cpan #12781] autoformat dies when mail => 1 and all content is in signature
RT-Send-Cc:
Guest via RT wrote: Show quoted text
> The test case attached is a mail/newsgroup posting where only the > article it being wrapped and the article consists of only a signature > so should not be too common but the result is quite severe.
Fixed. Thanks. Damian