Skip Menu |

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

Report information
The Basics
Id: 69720
Status: open
Priority: 0/
Queue: OpenOffice-OODoc

People
Owner: Nobody in particular
Requestors: charles.minc [...] wanadoo.fr
Cc:
AdminCc:

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



I have run the following program and it give an error message. Netheless, the table has been created. #utf8 our $VERSION = '1.0'; use 5.12.3; use strict ; use warnings ; use Carp ; use Data::Dumper; use File::Spec; my $file="./toto.odt" ; use OpenOffice::OODoc; my $doc = ooDocument ( file=>"./toto.odt", create => 'text', member => 'content' ); croak 'ça ne marche pas !' unless $doc; say "loup y est-tu ?" ; my $paragraphe = $doc->getParagraph(0); $doc->removeElement($paragraphe); my $feuille = $doc->appendTable('MaTable', 15, 12); $doc->cellValue($feuille, 'A1', 'Valeur A1'); $doc->cellValue($feuille, 'L15', 'Valeur L15'); say "loup y est-tu ?!" ; $doc->save; say $0 ; I got the following result : Show quoted text
>perl -w oodoctst.pl
Use of uninitialized value in lc at C:/Perl/site/lib/OpenOffice/OODoc/File.pm line 378. loup y est-tu ? loup y est-tu ?! oodoctst.pl Show quoted text
>Exit code: 0
The error message is due to the lack od the tag "openoffice" in oodocument(openoffice=>'true'). From the doc, it seems optionnal (generally not provided) but software is not fully fault tolerant when 'undef'
Le 2011-07-24 04:58:47, CHESSKIT a écrit :
Show quoted text
> The error message is due to the lack od the tag "openoffice" in
> oodocument(openoffice=>'true'). From the doc, it seems optionnal
> (generally not provided) but software is not fully fault tolerant when
> 'undef'

The issue comes from an apparent change in the 'lc' function introduced by Perl 5.12.
The same program runs without warning up to Perl 5.10.1.
As an immediate workaround, it's recommended to explicitly set the 'opendocument' option to 'true' each time a new document is created using ooDocument().
Alternatively, for fully new applications, one should switch to ODF::lpOD (that requires 5.10 and is more modern perl aware).