Skip Menu |

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

Report information
The Basics
Id: 34651
Status: resolved
Worked: 10 min
Priority: 0/
Queue: HTML-Table

People
Owner: a.peacock [...] chime.ucl.ac.uk
Requestors: colin.fine [...] pace.co.uk
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.07b
Fixed in: (no value)



Subject: getTable gets tbodies after the first wrong.
my $table = new HTML::Table $table->setSectionId('tbody', 0, 'sec0'); $table->addSectionRow('tbody', 0, 'hello'); $table->setSectionId('tbody', 1, 'sec1'); $table->addSectionRow('tbody', 1, 'byebye'); print $table; Produces .. <tbody id="sec0"> <tr> <td>hello</td> </tr> </tbody> <tbody id="sec0"> <tr> <td>byebye</td> </tr> </tbody> This is not surprising, as the code says ================================================ my $num_sections = @{$self->{tbody}} - 1; for my $j ( 0..$num_sections ) { # TBODY tag $html .= "<tbody"; # Set the section attributes (if any) $html .= ' id="' . $self->{tbody}[0]->{id} . '"' if defined $self->{tbody}[0]->{id}; =================================================== etc. It needs to say =================================================== my $num_sections = @{$self->{tbody}} - 1; for my $j ( 0..$num_sections ) { # TBODY tag $html .= "<tbody"; # Set the section attributes (if any) $html .= ' id="' . $self->{tbody}[$j]->{id} . '"' if defined $self->{tbody}[$j]->{id}; ================================================== etc. The part where it actually output the cells is right. Colin