This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #72340] sigtrap attempts to modify read-only thingy
authorJoshua N Pritikin <joshua@paloalto.com>
Fri, 24 Sep 2010 07:23:46 +0000 (00:23 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 24 Sep 2010 07:23:46 +0000 (00:23 -0700)
No much to say. sigtrap otherwise attempts to modify a
read-only thingy. Patch below solves it for me.

lib/sigtrap.pm

index 8577c72..35118a2 100644 (file)
@@ -95,7 +95,8 @@ sub handler_traceback {
     # Now go for broke.
     for ($i = 1; ($p,$f,$l,$s,$h,$w,$e,$r) = caller($i); $i++) {
         @a = ();
-       for (@args) {
+       for my $fr (@args) {
+            my $_ = $fr;
            s/([\'\\])/\\$1/g;
            s/([^\0]*)/'$1'/
              unless /^(?: -?[\d.]+ | \*[\w:]* )$/x;