On Thu May 23 08:36:26 2013, rurban wrote: > 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(); I"m not sure how to document the easy fix for the user in this use-case: Call the objects DESTROY method before global destruction. E.g. by setting foo->new() to a lexical, my $x = foo->new(); or by using it in a block, and it will be destroyed when going out of scope. -- Reini Urban --- via perlbug: queue: perl5 status: open https://rt.perl.org:443/rt3/Ticket/Display.html?id=118139Thread Previous | Thread Next