[Po4a-commits] "po4a/lib/Locale/Po4a Sgml.pm,1.110,1.111"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Mon Sep 18 20:55:13 UTC 2006


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv11407/lib/Locale/Po4a

Modified Files:
	Sgml.pm 
Log Message:
Do not reopen the input file.
Otherwise, it fails when the master document is stdin.


Index: Sgml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Sgml.pm,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -d -r1.110 -r1.111
--- Sgml.pm	14 Sep 2006 22:00:37 -0000	1.110
+++ Sgml.pm	18 Sep 2006 20:55:11 -0000	1.111
@@ -349,13 +349,12 @@
     # Rewrite the file to:
     #   - protect optional inclusion marker (ie, "<![ %str [" and "]]>")
     #   - protect entities from expansion (ie "&release;")
-    open (IN,"<$mastername")
-	|| die wrap_mod("po4a::sgml", dgettext("po4a", "Can't open %s: %s"), $mastername, $!);
     my $origfile="";
-    while (<IN>) {
-	$origfile .= $_;
+    my $i=0;
+    while ($i < @{$self->{TT}{doc_in}}) {
+        $origfile .= ${$self->{TT}{doc_in}}[$i];
+        $i+=2;
     }
-    close IN or die wrap_mod("po4a::sgml", dgettext("po4a", "Can't close %s: %s"), $mastername, $!);
     # Detect the XML pre-prolog
     if ($origfile =~ s/^(\s*<\?xml[^?]*\?>)//) {
 	warn wrap_mod("po4a::sgml", dgettext("po4a",




More information about the Po4a-commits mailing list