Fixes bug #79078, by pointing out the slight difference between Perl's
authorAbigail <abigail@abigail.be>
Sun, 14 Nov 2010 16:01:20 +0000 (17:01 +0100)
committerAbigail <abigail@abigail.be>
Sun, 14 Nov 2010 16:01:20 +0000 (17:01 +0100)
syntax for line directives, and the ones allowed by modern C preprocessors.

Reported by "kst@mib.org".

pod/perlsyn.pod

index 18143d1..bb2a9ce 100644 (file)
@@ -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