Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the HTML-FromText CPAN distribution.

Report information
The Basics
Id: 11516
Status: new
Priority: 0/
Queue: HTML-FromText

People
Owner: Nobody in particular
Requestors: perl [...] tecspy.com
Cc:
AdminCc:

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

Attachments


Subject: warnings produced when tables=>1 and paras=>1
Download (untitled) / with headers
text/plain 622b
Hi, I use HTML::FromText v2.05 under perl v5.8.4 (built for i386-linux-thread-multi) on a Debian Sarge box as part of Apache::MiniWiki under mod_perl and always run with warnings on. I get masses of warnings in the server logs originating from the table formatting code in HTML::FromText. I produced a minimal test case (attached) which is typical of the data we get. It produces a number of warnings when tables=>1 and paras=>1 (see attached) which is how it is used within Apache::MiniWiki. I'm sorry I can't fix it myself - I wouldn't know where to start! Regards, Michael Erskine Nottingham Perl Mongers group leader.
#!/usr/bin/perl -w use strict; # Get picky... use diagnostics -verbose; # Die upon warn - comment out this line to show further wornings... local $SIG{__WARN__} = sub { die $_[0] }; # Hot file handles... select( ( select(STDERR), $| = 1 )[0] ); select( ( select(STDOUT), $| = 1 )[0] ); # Our subject... use HTML::FromText; =for docs Note the pair of newlines after the title and the space after 'This' =cut my $t2 = <<'EOF'; Title This is a minimal test case for the warning. EOF my $text = text2html( $t2, urls => 0, email => 0, bold => 0, underline =>0, paras => 1, bullets => 0, numbers=> 1, headings => 0, blockcode => 0, tables => 1, title => 1, code => 0 ); print $text; =for docs And the result... Uncaught exception from user code: Use of uninitialized value in substr at /usr/share/perl5/HTML/FromText.pm line 739. main::__ANON__('Use of uninitialized value in substr at /usr/share/perl5/HTML...') called at /usr/share/perl5/HTML/FromText.pm line 739 HTML::FromText::_table_find_columns('HTML::FromText=HASH(0x837ebf4)', 'HASH(0x839ab7c)', 'ARRAY(0x8176248)') called at /usr/share/perl5/HTML/FromText.pm line 495 HTML::FromText::__ANON__('This \x{a}is a minimal test case for the warning.', 1, 'HASH(0x83860f4)') called at /usr/share/perl5/HTML/FromText.pm line 706 HTML::FromText::_manipulate_paras('HTML::FromText=HASH(0x837ebf4)', 'CODE(0x81e22c4)') called at /usr/share/perl5/HTML/FromText.pm line 502 HTML::FromText::tables('HTML::FromText=HASH(0x837ebf4)') called at /usr/share/perl5/HTML/FromText.pm line 419 HTML::FromText::paras('HTML::FromText=HASH(0x837ebf4)') called at /usr/share/perl5/HTML/FromText.pm line 281 HTML::FromText::parse('HTML::FromText=HASH(0x837ebf4)', 'Title\x{a}\x{a}This \x{a}is a minimal test case for the warning.\x{a}\x{a}') called at /usr/share/perl5/HTML/FromText.pm line 312 HTML::FromText::text2html('Title\x{a}\x{a}This \x{a}is a minimal test case for the warning.\x{a}\x{a}', 'urls', 0, 'email', 0, 'bold', 0, 'underline', 0, ...) called at test-html-fromtext.pl line 27 perl -V Summary of my perl5 (revision 5 version 8 subversion 4) configuration: Platform: osname=linux, osvers=2.4.27-ti1211, archname=i386-linux-thread-multi uname='linux kosh 2.4.27-ti1211 #1 sun sep 19 18:17:45 est 2004 i686 gnulinux ' config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i386-linux -Dprefix=/usr -Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.8.4 -Dsitearch=/usr/local/lib/perl/5.8.4 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm -Duseshrplib -Dlibperl=libperl.so.5.8.4 -Dd_dosuid -des' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -I/usr/local/include' ccversion='', gccversion='3.3.5 (Debian 1:3.3.5-8)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt perllibs=-ldl -lm -lpthread -lc -lcrypt libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libperl.so.5.8.4 gnulibc_version='2.3.2' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT Built under linux Compiled at Feb 3 2005 00:32:16 @INC: /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl . =cut


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.