Skip Menu |
 

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

Report information
The Basics
Id: 27336
Status: new
Priority: 0/
Queue: HTML-TableExtractor

People
Owner: Nobody in particular
Requestors: nalbion [...] yahoo.com
Cc:
AdminCc:

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



Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 776E64D8154 for <bug-HTML-TableExtractor [...] rt.cpan.org>; Tue, 29 May 2007 16:04:18 -0400 (EDT)
Received: (qmail 22605 invoked by alias); 29 May 2007 20:04:17 -0000
Received: from web50905.mail.re2.yahoo.com (HELO web50905.mail.re2.yahoo.com) (206.190.38.125) by la.mx.develooper.com (qpsmtpd/0.28) with SMTP; Tue, 29 May 2007 13:04:16 -0700
Received: (qmail 55322 invoked by uid 60001); 29 May 2007 20:04:11 -0000
Received: from [220.233.167.78] by web50905.mail.re2.yahoo.com via HTTP; Tue, 29 May 2007 13:04:11 PDT
Delivered-To: cpan-bug+html-tableextractor [...] diesel.bestpractical.com
MIME-Version: 1.0
Subject: bug in column()
X-Ymail-Osg: pv6rp54VM1nhHBhKXyS.NXp05HZ4eNAUnSGmjM1QEMJKXZVo
Domainkey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=6JL1hkB3sm/wu8/bJLFqscIZma0rvs19Uap2RLnsCDXMEXfcpiIDptZOhvjgSKwOFj5B6wQrpa7EO6mlrxJoSYz8WVvO8pv8TjKf8gXgtMSQf8KzoHpO6sA5x1t4LLoHYTlyZVbAr1plhhoozq3Nw1wez1DjJfSWLhBSYlRvYy0=;
X-Spam-Status: No, hits=-1.1 required=8.0 tests=BAYES_05,DKIM_SIGNED,DKIM_VERIFIED,DK_POLICY_TESTING,DK_SIGNED,DK_VERIFIED,SPF_PASS
Return-Path: <nalbion [...] yahoo.com>
X-Mailer: YahooMailRC/651.23.1 YahooMailWebService/0.7.41.14
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: bug-HTML-TableExtractor [...] rt.cpan.org
Date: Tue, 29 May 2007 13:04:10 -0700 (PDT)
Received-SPF: pass (x1.develooper.com: local policy)
Message-Id: <130274.55056.qm [...] web50905.mail.re2.yahoo.com>
content-type: text/plain; charset="utf-8"
To: bug-HTML-TableExtractor [...] rt.cpan.org
From: Nicholas Albion <nalbion [...] yahoo.com>
X-RT-Original-Encoding: ascii
Content-Length: 1558
Download (untitled) / with headers
text/plain 1.5k
# I thought it was odd when I was trying to execute the following code # and it failed on the last line: my $te = HTML::TableExtract->new(); $te->parse($content); my $table = $te->first_table_found(); # my $lang = substr( $table->cell(1,0), 0, 5); # <-- This works. my @tabColum = table->column($table,0); # I've tried debugging the code, injecting some print"" statements # into the following code from the HTML::TableExtract module sub column { my $self = shift; my $c = shift; my @column; foreach my $row ($self->rows) { push(@column, $self->cell($row, $c)); } wantarray ? @column : \@column; } # I'm no perl expert, but my debug prints have helped me prove (to myself) # that the line "foreach my $row ($self->rows) {" associates $row with an ARRAY. # ...So is it okay to to call "$self->cell( ARRAY, INT )"? sub cell { my $self = shift; my($r, $c) = @_; my $row = $self->row($r); # <-- $r is an ARRAY! $c <= $#$row or croak "Column $c out of range ($#$row)\n"; $self->_cell_to_content($row->[$c]); } sub row { my $self = shift; my $r = shift; $r <= $#{$self->{grid}} # <-- $r is an ARRAY! or croak "row $r out of range ($#{$self->{grid}})\n"; my @ri = $self->row_indices; my @row = $self->_slice_and_normalize_row( $self->{grid}[($self->row_indices)[$r]] ); wantarray ? @row : \@row; } # ARRAY <= $#{$self->{grid}} --> "row ARRAY(0x1d53464) out of range (27)"


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.