[Po4a-commits] "po4a/lib/Locale/Po4a Text.pm, 1.32, 1.33 Sgml.pm, 1.132, 1.133"

Denis Barbier barbier-guest at alioth.debian.org
Mon Jul 19 21:30:22 UTC 2010


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory alioth:/tmp/cvs-serv23085/lib/Locale/Po4a

Modified Files:
	Text.pm Sgml.pm 
Log Message:
Sgml and Text modules printed a strange warning when file_in_name is empty.

See http://bugs.debian.org/566182


Index: Text.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Text.pm,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- Text.pm	31 Mar 2010 10:14:31 -0000	1.32
+++ Text.pm	19 Jul 2010 21:30:20 -0000	1.33
@@ -202,7 +202,7 @@
     my $end_of_paragraph = 0;
     ($line,$ref)=$self->shiftline();
     my $file = $ref;
-    $file =~ s/:[0-9]+$//;
+    $file =~ s/:[0-9]+$// if defined($line);
     while (defined($line)) {
         $ref =~ m/^(.*):[0-9]+$/;
         if ($1 ne $file) {

Index: Sgml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Sgml.pm,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -d -r1.132 -r1.133
--- Sgml.pm	27 Dec 2009 01:16:03 -0000	1.132
+++ Sgml.pm	19 Jul 2010 21:30:20 -0000	1.133
@@ -366,7 +366,7 @@
     #   - protect entities from expansion (ie "&release;")
     my $origfile="";
     my $i=0;
-    while ($i < @{$self->{TT}{doc_in}}) {
+    while (defined(@{$self->{TT}{doc_in}}) && $i < @{$self->{TT}{doc_in}}) {
         $origfile .= ${$self->{TT}{doc_in}}[$i];
         $i+=2;
     }




More information about the Po4a-commits mailing list