[Po4a-commits] "po4a/lib/Locale/Po4a TeX.pm,1.98,1.99"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Sat Feb 28 21:35:45 UTC 2009


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

Modified Files:
	TeX.pm 
Log Message:
	* lib/Locale/Po4a/TeX.pm: Warn if kpsewhich cannot find the file.


Index: TeX.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/TeX.pm,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -d -r1.98 -r1.99
--- TeX.pm	22 Feb 2009 16:53:34 -0000	1.98
+++ TeX.pm	28 Feb 2009 21:35:42 -0000	1.99
@@ -1005,10 +1005,21 @@
 
 sub parse_definition_file {
     my ($self,$filename,$only_try)=@_;
+    my $filename_org = $filename;
 
     open (KPSEA, "kpsewhich " . $filename . " |");
     $filename = <KPSEA>;
 
+    if (not defined $filename) {
+        warn wrap_mod("po4a::tex",
+            dgettext("po4a", "kpsewhich cannot find %s"), $filename_org);
+        if (defined $only_try && $only_try) {
+            return;
+        } else {
+            exit 1;
+        }
+    }
+
     if (! open (IN,"<$filename")) {
         warn wrap_mod("po4a::tex",
             dgettext("po4a", "Can't open %s: %s"), $filename, $!);




More information about the Po4a-commits mailing list