diff options
author | Abigail <abigail@abigail.be> | 2010-11-14 17:01:20 +0100 |
---|---|---|
committer | Abigail <abigail@abigail.be> | 2010-11-14 17:01:20 +0100 |
commit | 24802a741468d87fdd5e986702d44cf3253b596f (patch) | |
tree | dc34671dc727490ff00d959dd36bd6b608a4a491 | |
parent | d7425188c3bef8a77425c103db57cf8cde99f5a0 (diff) | |
download | perl-24802a741468d87fdd5e986702d44cf3253b596f.tar.gz |
Fixes bug #79078, by pointing out the slight difference between Perl's
syntax for line directives, and the ones allowed by modern C preprocessors.
Reported by "kst@mib.org".
-rw-r--r-- | pod/perlsyn.pod | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod index 18143d180a..bb2a9ced31 100644 --- a/pod/perlsyn.pod +++ b/pod/perlsyn.pod @@ -925,8 +925,8 @@ X<comment> X<line> X<#> X<preprocessor> X<eval> Perl can process line directives, much like the C preprocessor. Using this, one can control Perl's idea of filenames and line numbers in error or warning messages (especially for strings that are processed -with C<eval()>). The syntax for this mechanism is the same as for most -C preprocessors: it matches the regular expression +with C<eval()>). The syntax for this mechanism is almost the same as for +most C preprocessors: it matches the regular expression # example: '# line 42 "new_filename.plx"' /^\# \s* @@ -935,7 +935,8 @@ C preprocessors: it matches the regular expression $/x with C<$1> being the line number for the next line, and C<$3> being -the optional filename (specified with or without quotes). +the optional filename (specified with or without quotes). Note that +no whitespace may preceed the C<< # >>, unlike modern C preprocessors. There is a fairly obvious gotcha included with the line directive: Debuggers and profilers will only show the last source line to appear |