Trap the read-only error, and try to get more information about it.

        Patch by kareila. 

diffs (30 lines):

diff -r 71ca6dc6ab13 -r d0b8d172eb90 lib/Apache/BML.pm
--- a/lib/Apache/BML.pm Thu Jul 29 06:45:46 2010 +0000
+++ b/lib/Apache/BML.pm Tue Aug 17 11:47:53 2010 +0800
@@ -627,7 +627,7 @@ sub reset_codeblock
     while (my ($key,$val) = each(%stab))
     {
         return if $DB::signal;
-        deleteglob ($key, $val);
+        deleteglob ($key, $val, undef, $req->{file});
     }
 }
 
@@ -635,12 +635,15 @@ sub deleteglob
 {
     no strict;
     return if $DB::signal;
-    my ($key, $val, $all) = @_;
+    my ($key, $val, $all, $file) = @_;
     local(*entry) = $val;
     my $fileno;
     if ($key !~ /^_</ and defined $entry)
     {
-        undef $entry;
+        eval { undef $entry };  # trap read-only value error
+        # FIXME: temporary; let's see if we can track down whether any 
particular
+        # read-only values are at fault
+        warn "$@: $file - $key " if $@;
     }
     if ($key !~ /^_</ and defined @entry)
     {
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to