Subject: | Segfault if STORABLE_freeze returns '' as first value |
was using this code:
sub STORABLE_freeze {
my ( $self, $cloning ) = @_;
return if $cloning;
my $copy = { %$self };
delete $copy->{dao};
return ( '', $copy );
}
and thaw segfaults, no matter what the STORABLE_thaw sub. The following
code doesn't - the only difference is the value of the first return
value.
sub STORABLE_freeze {
my ( $self, $cloning ) = @_;
return if $cloning;
my $copy = { %$self };
delete $copy->{dao};
return ( 'dummy', $copy );
}