[Po4a-commits] po4a/lib/Locale/Po4a Man.pm,1.76,1.77 Xml.pm,1.24,1.25

Jordi Vilalta po4a-devel@lists.alioth.debian.org
Tue, 15 Feb 2005 15:47:37 +0000


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

Modified Files:
	Man.pm Xml.pm 
Log Message:
Change "warn + exit 0" for "die" (exit 0 means "all ok" in the shell)


Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- Man.pm	14 Feb 2005 23:19:24 -0000	1.76
+++ Man.pm	15 Feb 2005 15:47:33 -0000	1.77
@@ -619,24 +619,20 @@
 	    if ($macro eq '\"' ||
 		$macro eq '"') {
 		if ($line =~ /Pod::Man/) {
-		    warn wrap_mod("po4a::man", dgettext("po4a", "This file was generated with Pod::Man. Translate the pod file with the pod module of po4a."));
-		    exit 0;
+		    die wrap_mod("po4a::man", dgettext("po4a", "This file was generated with Pod::Man. Translate the pod file with the pod module of po4a."));
 		} elsif ($line =~ /generated by help2man/)    {
 		    warn wrap_mod("po4a::man", dgettext("po4a", "This file was generated with help2man. Translate the source file with the regular gettext."));
 		} elsif ($line =~ /with docbook-to-man/)      {
-		    warn wrap_mod("po4a::man", dgettext("po4a", "This file was generated with docbook-to-man. Translate the source file with the sgml module of po4a."));
-		    exit 0;
+		    die wrap_mod("po4a::man", dgettext("po4a", "This file was generated with docbook-to-man. Translate the source file with the sgml module of po4a."));
 		} elsif ($line =~ /generated by docbook2man/) {
-		    warn wrap_mod("po4a::man", dgettext("po4a", "This file was generated with docbook2man. Translate the source file with the sgml module of po4a."));
-		    exit 0;
+		    die wrap_mod("po4a::man", dgettext("po4a", "This file was generated with docbook2man. Translate the source file with the sgml module of po4a."));
 		} elsif ($line =~ /created with latex2man/)   {
 		    warn wrap_mod("po4a::man", dgettext("po4a",
 			"This file was generated with %s. ".
 			"You should translate the source file, but continuing anyway."
 			),"latex2man");
 		} elsif ($line =~ /Generated by db2man.xsl/)  { 
-		    warn wrap_mod("po4a::man", dgettext("po4a","This file was generated with db2man.xsl. Translate the source file with the xml module of po4a."));
-		    exit 0;
+		    die wrap_mod("po4a::man", dgettext("po4a","This file was generated with db2man.xsl. Translate the source file with the xml module of po4a."));
 		} elsif ($line =~ /generated automatically by mtex2man/)  {
 		    warn wrap_mod("po4a::man", dgettext("po4a",
 			"This file was generated with %s. ".
@@ -647,7 +643,7 @@
 		    warn wrap_mod("po4a::man", dgettext("po4a",
 			"This file contains the line '%s'. ".
 			"You should translate the source file, but continuing anyway."
-			),"$line");
+			),$line);
 		}
 	    }
 

Index: Xml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Xml.pm,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- Xml.pm	12 Feb 2005 14:02:21 -0000	1.24
+++ Xml.pm	15 Feb 2005 15:47:34 -0000	1.25
@@ -583,8 +583,7 @@
 	if (!$found) {
 		#It should never enter here, unless you undefine the most
 		#general tags (as <...>)
-		print "po4a::xml: Unknown tag type: ".$line."\n";
-		exit;
+		die "po4a::xml: Unknown tag type: ".$line."\n";
 	} else {
 		return $i;
 	}