Skip Menu |

This queue is for tickets about the OpenOffice-OODoc CPAN distribution.

Report information
The Basics
Id: 48356
Status: resolved
Priority: 0/
Queue: OpenOffice-OODoc

People
Owner: Nobody in particular
Requestors: jordan.chicheportiche [...] bull.net
Cc:
AdminCc:

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



Subject: bug in "getTableByName" function
Hello, I'm your OpenOffice module for some weeks, which I found very useful. But while trying to use the getTableByName function of the Text.pm module I got a "use of uninitialized variable" error message. After look at the source code of this function I found what I think is a bug in it : a "$n" variable is used while a "$name" is defined and assigned a value. By replacing $n by $name, this function works. Original code of the function : sub getTableByName { my $self = shift; my $name = $self->inputTextConversion(shift); my $table = $self->getNodeByXPath ("//table:table[\@table:name=\"$n\"]"); return $self->getTable($table, @_); } Corrected code : sub getTableByName { my $self = shift; my $name = $self->inputTextConversion(shift); my $table = $self->getNodeByXPath ("//table:table[\@table:name=\"$name\"]"); return $self->getTable($table, @_); } I am working on the lastest module version. Here is the header of the Text.pm file : # $Id : Text.pm 2.236 2009-02-18 JMG$ Could you please fix this bug?
Hello, Yes, it's a bug, and the workaround is right before the next release. So, $n should be replaced by $name in Text.pm, line #3185, as shown below. Thanks for your report Le Ven. Jul. 31 09:30:58 2009, jordan.chicheportiche a écrit : Show quoted text
> Hello, > > I'm your OpenOffice module for some weeks, which I found very useful. > But while trying to use the getTableByName function of the Text.pm > module I got a "use of uninitialized variable" error message. After look > at the source code of this function I found what I think is a bug in it > : a "$n" variable is used while a "$name" is defined and assigned a > value. By replacing $n by $name, this function works. > > Original code of the function : > sub getTableByName > { > my $self = shift; > my $name = $self->inputTextConversion(shift); > my $table = $self->getNodeByXPath > ("//table:table[\@table:name=\"$n\"]"); > return $self->getTable($table, @_); > } > > > Corrected code : > sub getTableByName > { > my $self = shift; > my $name = $self->inputTextConversion(shift); > my $table = $self->getNodeByXPath > ("//table:table[\@table:name=\"$name\"]"); > return $self->getTable($table, @_); > } > > > I am working on the lastest module version. Here is the header of the > Text.pm file : > # $Id : Text.pm 2.236 2009-02-18 JMG$ > > > Could you please fix this bug?
Le Ven 31 Jui 2009 17:36:03, JMGDOC a écrit :
Show quoted text
> Hello,
>
> Yes, it's a bug, and the workaround is right before the next release.
> So, $n should be replaced by $name in Text.pm, line #3185, as shown below.
>
> Thanks for your report

Fixed in 2.109, soon in the mirrors...