On Mon, Jun 07, 2004 at 03:10:24AM +0800, Dan Jacobson <jidanni@jidanni.org> wrote: > >> "Transliteration replacement not terminated" > > (Ton> Basically, don't give your functions names of perl operators to avoid > (Ton> confusion (don't name them "y", "s", "q" or "m" for the single letters)) > > OK, the error messages should perhaps mention what letter was > bothering them, instead of hoping we on the spot will remember that y > is an alias for tr which stands for Transliteration. > > The user was thinking "I'll plot y as a function of x", and could not > tell from the message what went wrong, especially as it is all on one > line being from a makefile. > > Indeed, I bet if line numbers were removed, perl error messages would > lose to gawk in terms of clarity. > > Gawk often points out just where things went wrong, with a ^. Running with with "use diagnostics;" (or feeding the warning/error message to the splain utility) produces a more verbose description. Unfortunately, the one for an unclosed tr/... mentions y/// but the an unclosed tr//.... doesn't. --- perl/pod/perldiag.pod.orig 2004-05-13 05:36:23.000000000 -0700 +++ perl/pod/perldiag.pod 2004-06-07 00:25:10.655542400 -0700 @@ -3835,7 +3835,7 @@ =item Transliteration replacement not terminated (F) The lexer couldn't find the final delimiter of a tr/// or tr[][] -construct. +or y/// or y[][] construct. =item '%s' trapped by operation maskThread Previous | Thread Next