Skip Menu |

This queue is for tickets about the txt2html CPAN distribution.

Report information
The Basics
Id: 42569
Status: new
Priority: 0/
Queue: txt2html

People
Owner: Nobody in particular
Requestors: John.Gustafsson [...] packetfront.com
Cc:
AdminCc:

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



Subject: instring doesnt work
Date: Tue, 20 Jan 2009 17:00:18 +0100
To: <bug-txt2html [...] rt.cpan.org>
From: "John Gustafsson" <John.Gustafsson [...] packetfront.com>

Message body is not shown because sender requested not to inline it.

Hello I've attached some code that doesn't work with HTML::TextToHTML v2.5.1 This is the output on my system: Use of uninitialized value $para in substitution (s///) at /usr/share/perl5/HTML/TextToHTML.pm line 1523. Use of uninitialized value $para in split at /usr/share/perl5/HTML/TextToHTML.pm line 5142. Use of uninitialized value $chunk in split at /usr/share/perl5/HTML/TextToHTML.pm line 873. Use of uninitialized value $para in substitution (s///) at /usr/share/perl5/HTML/TextToHTML.pm line 1523. Use of uninitialized value $chunk in split at /usr/share/perl5/HTML/TextToHTML.pm line 873. Use of uninitialized value $para in substitution (s///) at /usr/share/perl5/HTML/TextToHTML.pm line 1523. Use of uninitialized value $chunk in split at /usr/share/perl5/HTML/TextToHTML.pm line 873. The problem seems to be the following code: if ($source_type eq 'string') { # process the string $para = $_; $para =~ s/\n$//; # trim the endline line 1519-1523. Thing is, there seems like there is nothing in $_. The string is saved in $source as per: foreach my $source (@sources) line 1491. Easiest fix for me was to change $para = $_; to $para = $source. You probably want to do something fancier J. Perl -v This is perl, v5.10.0 built for i486-linux-gnu-thread-multi Copyright 1987-2007, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. Uname -a Linux rx100s2 2.6.27-9-generic #1 SMP Thu Nov 20 21:57:00 UTC 2008 i686 GNU/Linux Yours Sincerely John Gustafsson