develooper Front page | perl.perl5.porters | Postings from May 2013

[perl #118139] Storable in DESTROY blocks

Thread Next
From:
Reini Urban via RT
Date:
May 23, 2013 15:36
Subject:
[perl #118139] Storable in DESTROY blocks
Message ID:
rt-3.6.HEAD-2650-1369323386-324.118139-15-0@perl.org
The attached patch fixes the DESTROY issue. 
This is a pretty rare use case, but deserves a CPAN release also.

use Storable;
BEGIN { store {}, "foo"; }
package foo;
sub new { return bless {} }
DESTROY { open $fh, "<", "foo";
  eval { Storable::pretrieve($fh); }; #SEGV
  unlink "foo";
}
package main;
foo->new();

-- 
Reini Urban

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org:443/rt3/Ticket/Display.html?id=118139

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About