On Thu Jun 28 21:43:30 2012, sprout wrote: > On Thu Jun 28 20:32:02 2012, doy@tozt.net wrote: > > use Storable 'dclone' > > my $copy = dclone(\v1.2.3); > > is(ref($copy), 'VSTRING'); > > > > This fails, because Storable serializes the vstring as just a normal > > string. > > I've already added a TODO test for this in the Storable test suite. I’ve fixed it with commits e00e3c3ee and 7e2a0d4586. > In case you are planning to fix this, you might want to look at commit > d036e907fea, which added vstring support to Data::Dumper. Vstrings have > been a bit buggy in earlier versions of perl (and Storable is > dual-life). In particular, ~v0 returns a scalar with vstring magic > attached to it when it shouldn’t. Data::Dumper detects that and treats > it as not-a-vstring. That did not actually matter, as Storable can store both the PV and the magic PV, so what comes back is identical. Data::Dumper can only store one (either "\1\2\3" or v1.2.3), so it has to choose based on whether they actually match. -- Father Chrysostomos --- via perlbug: queue: perl5 status: open https://rt.perl.org:443/rt3/Ticket/Display.html?id=113894Thread Previous | Thread Next