diff options
author | Karl Berry <karl@freefriends.org> | 2009-10-03 18:40:00 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-10-03 18:40:00 +0000 |
commit | 78763a7c0efdc52404b7c183a1f4d5523d279dba (patch) | |
tree | 6e03f08ded7e6b977c49a9a6adf78b9d77df1abf /Master/tlpkg/TeXLive/TLPSRC.pm | |
parent | 0b340abff204575eda0f4b917bd3c26ab01a4823 (diff) |
(from_file): keep track of line numbers for error message
git-svn-id: svn://tug.org/texlive/trunk@15617 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPSRC.pm')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPSRC.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm index 73807529a3c..8cd00e9e725 100644 --- a/Master/tlpkg/TeXLive/TLPSRC.pm +++ b/Master/tlpkg/TeXLive/TLPSRC.pm @@ -86,7 +86,10 @@ sub from_file my $finished = 0; my $savedline = ""; - foreach my $line (@lines) { + my $lineno = 0; + for my $line (@lines) { + $lineno++; + # we allow continuation lines in tlpsrc files, i.e., lines with a \ at # the end if ($line =~ /^(.*)\\$/) { @@ -152,7 +155,7 @@ sub from_file push @postactions, $1 if ($1 ne ""); next; } else { - tlwarn("$srcfile:$.: unknown tlpsrc directive, please fix: $line\n"); + tlwarn("$srcfile:$lineno: unknown tlpsrc directive, fix fix: $line\n"); } } } |