Hi Ravi,
setCellHeight does indeed refer to $self->{last_row} which is an error.
However, selColHeight never call setCellHeight, it calls
setCellSectionHeight.
I have used the following script to try to recreate your problem.
#!/usr/bin/perl -w
use strict;
use HTML::Table;
print "<H1>Test file using HTML::Table version $HTML::Table::VERSION</H1>";
my $table = new HTML::Table ( 2, 4 );
$table->setBorder( 1 ) ;
$table->setWidth ( "100%" );
$table->print;
$table->setColHeight ( 1, "30" );
$table->print;
Based on your problem description. This script does not give the error
that you are describing.
Can you send me a short but complete script that exhibits the error you
are reporting?
Ravi Kondamuru wrote:
> Hi,
> I recently upgraded to the latest version of Table.pm <
http://Table.pm>
> at that time (2.07-b2). Thats when I noticed this problem. Version 2.06
> was the last working version I used.
> thanks,
> Ravi.
>
> On Feb 4, 2008 2:24 AM, Anthony Peacock <a.peacock@chime.ucl.ac.uk
> <mailto:a.peacock@chime.ucl.ac.uk>> wrote:
>
> Hi Ravi,
>
> I am trying to track this down at the moment.
>
> Can you let me know which version of HTML::Table you are using?
>
>
> Ravi Kondamuru via RT wrote:
> > Fri Jan 18 07:46:24 2008: Request 32415 was acted upon.
> > Transaction: Ticket created by ravikondamuru@gmail.com
> <mailto:ravikondamuru@gmail.com>
> > Queue: HTML-Table
> > Subject: BUG: new HTML::Table(row, col) does not initialize
> last_row
> > Broken in: (no value)
> > Severity: (no value)
> > Owner: Nobody
> > Requestors: ravikondamuru@gmail.com
> <mailto:ravikondamuru@gmail.com>
> stepped
> > through the script and found that in HTML-Table.pm, setCellHeight
> accesses
> > self->{last_row} and that causes an error. The reason I found is that
> > last_row is uninitialized after calling new HTML::Table(row,
> col); Can you
> > please check to see if I am missing something?
> >
> > thanks,
> > Ravi.
> >
> > Error:
> >
> > Use of uninitialized value in numeric gt (>) at
> > /usr/local/lib/perl5/site_perl/5.8.7/HTML/Table.pm line 2146.
> > at /usr/local/lib/perl5/site_perl/5.8.7/HTML/Table.pm line 2146
> > HTML::Table::setCellHeight('HTML::Table=HASH(0x8ab9ad4)',
> 2, 2,
> > '20%') called at
> /usr/local/lib/perl5/site_perl/5.8.0/NS/PageLayout.pm line
> > 25
> >
> >
> > ############## Perl debugging session START ##############
> >
> > DB<1> n
> >
> NS::PageLayout::get_ctxs_2_body_page_layout(/usr/local/lib/perl5/site_perl/5.8.0/NS/PageLayout.pm:12):
> > 12: my $layout = new HTML::Table(4, 2);
> > DB<1> n
> >
> NS::PageLayout::get_ctxs_2_body_page_layout(/usr/local/lib/perl5/site_perl/5.8.0/NS/PageLayout.pm:13):
> >
> > 13: $layout->setWidth('100%');
> > DB<1> p $layout
> >
> > <table>
> > <tbody>
> > <tr><td></td><td></td></tr>
> > <tr><td></td><td></td></tr>
> > <tr><td></td><td></td></tr>
> > <tr><td></td><td></td></tr>
> > </tbody>
> > </table>
> >
> > DB<2> p $layout->{last_row}
> > Use of uninitialized value in print at (eval
> > 35)[/usr/local/lib/perl5/5.8.7/perl5db.pl:628] line 2.
> > at (eval 35)[/usr/local/lib/perl5/5.8.7/perl5db.pl:628] line 2
> > eval '($@, $!, $^E, $,, $/, $\\, $^W) = @saved;package
> > NS::PageLayout; $^D = $^D | $DB::db_stop;
> > print {$DB::OUT} $layout->{last_row};
> >
> > ;' called at /usr/local/lib/perl5/5.8.7/perl5db.pl line 628
> > DB::eval called at /usr/local/lib/perl5/5.8.7/perl5db.pl
> line 3410
> > DB::DB called at
> > /usr/local/lib/perl5/site_perl/5.8.0/NS/PageLayout.pm line 13
> > NS::PageLayout::get_ctxs_2_body_page_layout(20, 65) called at
> > /usr2/scripts/BugFix.pl line 47
> > main::print_prompt() called at /usr2/scripts/BugFix.pl
> line 42
> >
> > DB<3> p $layout->{last_col}
> > 2
> > DB<4>
> > ############## Perl debugging session END ##############
> >
> >
> >
> >
> ------------------------------------------------------------------------
> >
> > Hi,
> >
> > I am trying to setColHeight and am getting the following error. I
> > stepped through the script and found that in HTML-Table.pm,
> > setCellHeight accesses self->{last_row} and that causes an error. The
> > reason I found is that last_row is uninitialized after calling new
> > HTML::Table(row, col); Can you please check to see if I am missing
> > something?
> >
> > thanks,
> > Ravi.
> >
> > Error:
> >
> > Use of uninitialized value in numeric gt (>) at
> > /usr/local/lib/perl5/site_perl/5.8.7/HTML/Table.pm line 2146.
> > at /usr/local/lib/perl5/site_perl/5.8.7/HTML/Table.pm line 2146
> > HTML::Table::setCellHeight('HTML::Table=HASH(0x8ab9ad4)',
> 2, 2,
> > '20%') called at
> /usr/local/lib/perl5/site_perl/5.8.0/NS/PageLayout.pm
> > line 25
> >
> >
> > ############## Perl debugging session START ##############
> >
> > DB<1> n
> >
> NS::PageLayout::get_ctxs_2_body_page_layout(/usr/local/lib/perl5/site_perl/5.8.0/NS/PageLayout.pm:12):
> > 12: my $layout = new HTML::Table(4, 2);
> > DB<1> n
> >
> NS::PageLayout::get_ctxs_2_body_page_layout(/usr/local/lib/perl5/site_perl/5.8.0/NS/PageLayout.pm:13):
> >
> > 13: $layout->setWidth('100%');
> > DB<1> p $layout
> >
> > <table>
> > <tbody>
> > <tr><td></td><td></td></tr>
> > <tr><td></td><td></td></tr>
> > <tr><td></td><td></td></tr>
> > <tr><td></td><td></td></tr>
> > </tbody>
> > </table>
> >
> > DB<2> p $layout->{last_row}
> > Use of uninitialized value in print at (eval
> > 35)[/usr/local/lib/perl5/5.8.7/perl5db.pl:628] line 2.
> > at (eval 35)[/usr/local/lib/perl5/5.8.7/perl5db.pl:628] line 2
> > eval '($@, $!, $^E, $,, $/, $\\, $^W) = @saved;package
> > NS::PageLayout; $^D = $^D | $DB::db_stop;
> > print {$DB::OUT} $layout->{last_row};
> >
> > ;' called at /usr/local/lib/perl5/5.8.7/perl5db.pl line 628
> > DB::eval called at /usr/local/lib/perl5/5.8.7/perl5db.pl
> line 3410
> > DB::DB called at
> > /usr/local/lib/perl5/site_perl/5.8.0/NS/PageLayout.pm line 13
> > NS::PageLayout::get_ctxs_2_body_page_layout(20, 65) called at
> > /usr2/scripts/BugFix.pl line 47
> > main::print_prompt() called at /usr2/scripts/BugFix.pl
> line 42
> >
> > DB<3> p $layout->{last_col}
> > 2
> > DB<4>
> >
> > ############## Perl debugging session END ##############
> >
> > --
> > రవిచంద్ర కొండమూరు
> > (Ravi Kondamuru)
>
>
> --
> Anthony Peacock
> CHIME, Royal Free & University College Medical School
> WWW:
http://www.chime.ucl.ac.uk/~rmhiajp/
> <
http://www.chime.ucl.ac.uk/%7Ermhiajp/>
> "A CAT scan should take less time than a PET scan. For a CAT scan,
> they're only looking for one thing, whereas a PET scan could result in
> a lot of things." - Carl Princi, 2002/07/19
>
>
>
>
> --
> రవిచంద్ర కొండమూరు
> (Ravi Kondamuru)
--
Anthony Peacock
CHIME, Royal Free & University College Medical School
WWW:
"A CAT scan should take less time than a PET scan. For a CAT scan,
they're only looking for one thing, whereas a PET scan could result in
a lot of things." - Carl Princi, 2002/07/19