Skip Menu |

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

Report information
The Basics
Id: 40983
Status: new
Priority: 0/
Queue: HTML-GenToc

People
Owner: Nobody in particular
Requestors: ddascalescu+perl [...] gmail.com
Cc:
AdminCc:

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



Subject: String-only processing still outputs to STDOUT
my $string = "<h1>foo</h1>"; my $toc = new HTML::GenToc(); my $all = $toc->generate_toc( input => $string, to_string => 1, ); # still outputs to STDOUT
From: ddascalescu+perl [...] gmail.com
Attached test case.
#!/usr/bin/perl -w require HTML::GenToc; my $string = " <html> <head> </head> <body> <tochere> <h1>first header</h1> Some header text here <h1>second header</h1> Some header text here <h2>second header, first subheader</h2> Some subheader text here <h2>second header, second subheader</h2> Another piece of subheader text here <h1>third header</h1> Third header text </body> </html> "; my $toc = new HTML::GenToc(); my $all = $toc->generate_toc( to_string => 1, input => $string, toc_tag => 'tochere', toc_tag_replace => 1, inline => 1, outfile => undef ); print $all; # TOC not inserted