In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/7e2a0d4586762cf28c9cdfb3c49d57d805879ac9?hp=4ad9e498704f6c321c22e3b409602df0ecdeae83>
- Log ----------------------------------------------------------------- commit 7e2a0d4586762cf28c9cdfb3c49d57d805879ac9 Author: Father Chrysostomos <[email protected]> Date: Mon Jul 30 23:32:11 2012 -0700 Storable: blessed long vstrings I made a mistake in the long vstring code. The stored blessing was being ignored. ----------------------------------------------------------------------- Summary of changes: dist/Storable/Storable.xs | 2 +- dist/Storable/t/blessed.t | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dist/Storable/Storable.xs b/dist/Storable/Storable.xs index 33f6850..eca061a 100644 --- a/dist/Storable/Storable.xs +++ b/dist/Storable/Storable.xs @@ -4943,7 +4943,7 @@ static SV *retrieve_lvstring(pTHX_ stcxt_t *cxt, const char *cname) New(10003, s, len+1, char); SAFEPVREAD(s, len, s); - sv = retrieve(aTHX_ cxt, 0); + sv = retrieve(aTHX_ cxt, cname); sv_magic(sv,NULL,PERL_MAGIC_vstring,s,len); /* 5.10.0 and earlier seem to need this */ diff --git a/dist/Storable/t/blessed.t b/dist/Storable/t/blessed.t index 7c088e3..fe439ac 100644 --- a/dist/Storable/t/blessed.t +++ b/dist/Storable/t/blessed.t @@ -30,6 +30,7 @@ use Storable qw(freeze thaw store retrieve); %::weird_refs = ( REF => \(my $aref = []), VSTRING => \(my $vstring = v1.2.3), + 'long VSTRING' => \(my $vstring = eval "v" . 0 x 300), LVALUE => \(my $substr = substr((my $str = "foo"), 0, 3)), ); } @@ -285,7 +286,7 @@ is(ref $t, 'STRESS_THE_STACK'); my $thawn = thaw($frozen); # is_deeply ignores blessings is ref $thawn, ref $obj, "get the right blessing back for $weird"; - if ($weird eq 'VSTRING') { + if ($weird =~ 'VSTRING') { # It is not just Storable that did not support vstrings. :-) # See https://rt.cpan.org/Ticket/Display.html?id=78678 my $newver = "version"->can("new") -- Perl5 Master Repository
