fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-09-14 05:34 am

[bml] Make BML play nice with perl profilers

[commit: http://hg.dwscoalition.org/bml/rev/15b46611f71c]

http://bugs.dwscoalition.org/show_bug.cgi?id=3048

Retain old values of the $PERLDB variable; add a missing space to the "#
line $number $filename" directive.

Patch by [personal profile] exor674.

Files modified:
  • lib/Apache/BML.pm
--------------------------------------------------------------------------------
diff -r d0b8d172eb90 -r 15b46611f71c lib/Apache/BML.pm
--- a/lib/Apache/BML.pm	Tue Aug 17 11:47:53 2010 +0800
+++ b/lib/Apache/BML.pm	Tue Sep 14 13:33:49 2010 +0800
@@ -32,7 +32,7 @@ BEGIN {
 
 BEGIN {
     # So we get better reporiting on failures in BML files
-    $^P = 0x100;
+    $^P |= 0x100;
 }
 
 # set per request:
@@ -716,7 +716,7 @@ sub bml_block
             # show up separate in profiling, but now we cache
             # everything, so it pretty much never shows up.
             compile(join('',
-                         "# line 1'$req->{'file'}'\n",
+                         "# line 1 \"$req->{'file'}\"\n",
                          'package ',
                          $md5_package,
                          ';',
--------------------------------------------------------------------------------