[Po4a-devel]Sgml.pm: Issue an error if nsgmls is missing

Francois Gouget fgouget@codeweavers.com
Mon, 30 May 2005 17:17:15 +0200


This is a multi-part message in MIME format.
--------------010004010806050405030807
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Martin Quinson wrote:
[...]
> Perfect, commited, thanks. I just changed the output to use the usual way to
> do so (translating and wrapping).

Sorry about that, I should have thought about it.
However there's a little problem with your commit: you forgot the check 
for ($? !=0) which makes the Sgml.pm module fail systematically<g>. 
Here's a patch to fix this.


Changelog:

  * lib/Locale/Po4a/Sgml.pm

    Francois Gouget <fgouget@codeweavers.com>
    Fix the nsgmls check.

-- 
Francois Gouget
fgouget@codeweavers.com


--------------010004010806050405030807
Content-Type: text/plain;
 name="po4a-20050530-nsgmls2.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="po4a-20050530-nsgmls2.diff"

Index: lib/Locale/Po4a/Sgml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Sgml.pm,v
retrieving revision 1.59
diff -u -p -r1.59 Sgml.pm
--- lib/Locale/Po4a/Sgml.pm	30 May 2005 07:05:22 -0000	1.59
+++ lib/Locale/Po4a/Sgml.pm	30 May 2005 14:58:52 -0000
@@ -864,7 +876,7 @@ sub parse_file {
     # What to do after parsing
     $self->pushline($buffer);
     close(IN);
-    die wrap_mod("po4a::sgml", dgettext("po4a","nsgmls is missing or non-functional"));
+    die wrap_mod("po4a::sgml", dgettext("po4a","nsgmls is missing or non-functional")) if ($? != 0);
     unlink ($tmpfile) unless $debug{'refs'};
 }
 

--------------010004010806050405030807--