Skip Menu |

This queue is for tickets about the Scalar-Defer CPAN distribution.

Report information
The Basics
Id: 31961
Status: new
Priority: 0/
Queue: Scalar-Defer

Owner: Nobody in particular
Requestors: a.r.ferreira [...]

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

Subject: [PATCH] new function Scalar::Defer::is_deferred
Date: Fri, 28 Dec 2007 12:09:00 -0200
To: "Audrey Tang" <audreyt [...]>, bugs-Scalar-Defer [...]
From: "Adriano Ferreira" <a.r.ferreira [...]>
Hi, Audrey. I am sending a patch to Scalar-Defer-0.12 for your consideration. The proposed changes are summarized below. Kind regards, Adriano Ferreira ### new exportable function 'is_deferred' Why? If you want to use the deferred value as a generator (in the same place you could use a regular value), you may detect this with 'is_deferred' and then force it. my $regular_value = is_deferred($value) ? force($value) : $value; (I used that at the recent Class::Constructor::Factory 0.001, but had to include a hack which knows "too much" about Scalar::Defer guts) ### 'private' in use Class::InsideOut qw( private register id ) was unused. Removed in the patch. (Not sure if it has hidden implications.) ### FALSE_PACKAGE and DEFER_PACKAGE were both '0' Apparently FALSE_PACKAGE should have been superseded by DEFER_PACKAGE (and it is, with an only exception of the line @{FALSE_PACKAGE().'::ISA'} = ('Scalar::Defer::Deferred'); ). And this is a little misleading because all the rest of the code used DEFER_PACKAGE. So FALSE_PACKAGE was removed too. ###
Download scalar-defer.patch
text/x-diff 4.9k

Message body is not shown because sender requested not to inline it.

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

Please report any issues with to