Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Storable CPAN distribution.

Report information
The Basics
Id: 57977
Status: new
Priority: 0/
Queue: Storable

People
Owner: Nobody in particular
Requestors: tabris [...] tabris.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: bug-Storable [...] rt.cpan.org, perl5-porters [...] perl.org
Subject: Re: Storable - Feature-request - alternate freeze/thaw hooks
Date: Sun, 30 May 2010 10:05:53 -0700
To: Yuval Kogman <nothingmuch [...] woobling.org>
From: tabris <tabris [...] tabris.net>
Yuval Kogman wrote: Show quoted text
> That would break circular references, which might not be a concern for > GMP ints but is required for other things. > > However, ince the typemap specifies: > > OUTPUT > MPZ > sv_setref_pv($arg, \"Math::BigInt::GMP\", INT2PTR(void*, $var)); > > > You can probably just get away with > > sub STORABLE_thaw { > my ( $self ) = @_; > > my $new = ... thaw a new instance ...; > bless $new, "Something::Else"; # avoid any destructors > $$self = $$new; # simply steal the pointer > } >
I'll try this approach again (I did something similar but was trying to replace the obj-ref, not the pointer itself). And incidentally, is there a way that in the freeze hook I could freeze a Math::BigInt, rather than Math::BigInt::GMP ? That would get around this problem _and_ 'do the right thing' insofar as the _user_ probably just wanted a Math::BigInt, not a Math::BigInt::GMP. Show quoted text
> but it would probably be better to refactor the M::B::GMP code to > allow doing this sort of thing without violating encapsulation. > >
Download signature.asc
application/pgp-signature 258b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #57977] AutoReply: Re: Storable - Feature-request - alternate freeze/thaw hooks
Date: Sun, 30 May 2010 10:25:32 -0700
To: bug-Storable [...] rt.cpan.org
From: tabris <tabris [...] tabris.net>
RefersTo: 57969 This is a dup ticket, but I can't figure out how to close it.
Download signature.asc
application/pgp-signature 258b

Message body not shown because it is not plain text.