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: 57976
Status: new
Priority: 0/
Queue: Storable

People
Owner: Nobody in particular
Requestors: nothingmuch [...] woobling.org
Cc:
AdminCc:

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



From nothingmuch [...] woobling.org Sun May 30 12: 23:35 2010
CC: bug-Storable [...] rt.cpan.org, perl5-porters [...] perl.org
MIME-Version: 1.0
In-Reply-To: <4C017676.7010706 [...] tabris.net>
X-Spam-Status: No, score=-6.599 tagged_above=-99.9 required=10 tests=[AWL=4.000, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8] autolearn=ham
X-Spam-Flag: NO
References: <4C017676.7010706 [...] tabris.net>
Content-Type: text/plain; charset=UTF-8
Message-ID: <AANLkTimOaCIXW3ZK2apuLPrinPeQhnd7iHf25su4WTOa [...] mail.gmail.com>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -6.599
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 86CEE2407C8 for <cpan-bug+Storable [...] hipster.bestpractical.com>; Sun, 30 May 2010 12:23:35 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cthdFnG3+LYH for <cpan-bug+Storable [...] hipster.bestpractical.com>; Sun, 30 May 2010 12:23:34 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id C21D52407C6 for <bug-Storable [...] rt.cpan.org>; Sun, 30 May 2010 12:23:33 -0400 (EDT)
Received: (qmail 32224 invoked by uid 103); 30 May 2010 16:24:19 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 30 May 2010 16:24:19 -0000
Received: from mail-fx0-f50.google.com (HELO mail-fx0-f50.google.com) (209.85.161.50) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Sun, 30 May 2010 09:24:17 -0700
Received: by fxm1 with SMTP id 1so1923024fxm.9 for <bug-Storable [...] rt.cpan.org>; Sun, 30 May 2010 09:24:14 -0700 (PDT)
Received: by 10.239.189.14 with SMTP id r14mr270512hbh.133.1275236654124; Sun, 30 May 2010 09:24:14 -0700 (PDT)
Received: by 10.239.180.207 with HTTP; Sun, 30 May 2010 09:23:54 -0700 (PDT)
Delivered-To: cpan-bug+Storable [...] hipster.bestpractical.com
Subject: Re: Storable - Feature-request - alternate freeze/thaw hooks
Return-Path: <nothingmuch [...] woobling.org>
X-RT-Mail-Extension: storable
X-Original-To: cpan-bug+Storable [...] hipster.bestpractical.com
X-Spam-Check-BY: 16.mx.develooper.com
Date: Sun, 30 May 2010 19:23:54 +0300
X-Spam-Level:
To: tabris <tabris [...] tabris.net>
From: Yuval Kogman <nothingmuch [...] woobling.org>
X-RT-Original-Encoding: utf-8
Content-Length: 595
Download (untitled) / with headers
text/plain 595b
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 } but it would probably be better to refactor the M::B::GMP code to allow doing this sort of thing without violating encapsulation.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.