diff options
author | Karl Berry <karl@freefriends.org> | 2009-11-26 19:31:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-11-26 19:31:48 +0000 |
commit | de7b76c392abe4463c6a765f01b58096a8ebd040 (patch) | |
tree | 3b2fbc1421f3037068addd66954095a24d042963 /Master/texmf-dist/source/latex | |
parent | cee29d1652d5add426ac3aae626f1700ed9e7458 (diff) |
perltex 2.0 (24nov09)
git-svn-id: svn://tug.org/texlive/trunk@16180 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r-- | Master/texmf-dist/source/latex/perltex/perltex.dtx | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/Master/texmf-dist/source/latex/perltex/perltex.dtx b/Master/texmf-dist/source/latex/perltex/perltex.dtx index ea9bee773ea..4513a50f8d3 100644 --- a/Master/texmf-dist/source/latex/perltex/perltex.dtx +++ b/Master/texmf-dist/source/latex/perltex/perltex.dtx @@ -22,7 +22,7 @@ %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{perltex} %<*package> - [2009/09/13 v1.9 LaTeX macros for use with PerlTeX] + [2009/11/24 v2.0 LaTeX macros for use with PerlTeX] %</package> % %<*driver> @@ -62,7 +62,7 @@ %</driver> % \fi % -% \CheckSum{597} +% \CheckSum{601} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -2192,6 +2192,7 @@ use Pod::Usage; use File::Basename; use Fcntl; use POSIX; +use Cwd qw(abs_path); use IO::Handle; use warnings; use strict; @@ -2429,6 +2430,19 @@ $latexcmdline[$firstcmd] = % % \subsubsection{Increasing \PerlTeX's robustness} % +% \changes{v2.0}{2009/11/24}{Refer to each communication file using +% its absolute path. This makes \perltex\ robust to user code +% that changes the current directory} +% \begin{macrocode} +$toperl = abs_path $toperl; +$fromperl = abs_path $fromperl; +$toflag = abs_path $toflag; +$fromflag = abs_path $fromflag; +$doneflag = abs_path $doneflag; +$logfile = abs_path $logfile; +$pipe = abs_path $pipe; +% \end{macrocode} +% % \changes{v1.9}{2009/09/13}{Introduced handlers for \textsc{sigalrm} % and \textsc{sigpipe} to make \perltex\ more robust to \texttt{latex} % exiting at an inopportune time} @@ -2516,6 +2530,7 @@ sub awaitexists ($) % \begin{macrocode} delete_files($toperl, $fromperl, $toflag, $fromflag, $doneflag, $pipe); open (LOGFILE, ">$logfile") || die "open(\"$logfile\"): $!\n"; +autoflush LOGFILE 1; if (defined $styfile) { open (STYFILE, ">$styfile") || die "open(\"$styfile\"): $!\n"; } @@ -2729,6 +2744,9 @@ while (1) { % \LaTeX\ code or as a |\PackageError|---we store it in % |@macroexpansions| in preparation for writing it to \noperlmac\ % (when \perltex\ is run with \texttt{--makesty}). +% \changes{v2.0}{2009/11/21}{Substituted +% \texttt{\string\string\string\MessageBreak} for newline when +% reporting error messages produced by user code} % \begin{macrocode} undef $_; my $result; @@ -2746,6 +2764,7 @@ while (1) { if ($@) { my $msg = $@; $msg =~ s/at \(eval \d+\) line \d+\W+//; + $msg =~ s/\n/\\MessageBreak\n/g; $msg =~ s/\s+/ /; $result = "\\PackageError{perltex}{$msg}"; my @helpstring; |