Skip Menu |
 

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

Report information
The Basics
Id: 116762
Status: open
Priority: 0/
Queue: Scalar-List-Utils

People
Owner: Nobody in particular
Requestors: MAUKE [...] cpan.org
Cc:
AdminCc:

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



Subject: add interface to SvREADONLY and SvREFCNT
Download (untitled) / with headers
text/plain 382b
As described in <http://www.nntp.perl.org/group/perl.perl5.porters/2016/08/msg238712.html>, it would be nice if Scalar::Util had functions for getting the refcount of a variable and making a variable read-only. There's already a 'readonly' function for getting the RO status, so 'set_readonly($var)' seems like a natural extension. The other one could be done as 'refcount($var)'.
Download (untitled) / with headers
text/plain 607b
On Sat Aug 06 16:37:23 2016, MAUKE wrote: Show quoted text
> As described in > <http://www.nntp.perl.org/group/perl.perl5.porters/2016/08/msg238712.html>, > it would be nice if Scalar::Util had functions for getting the > refcount of a variable and making a variable read-only. > > There's already a 'readonly' function for getting the RO status, so > 'set_readonly($var)' seems like a natural extension. The other one > could be done as 'refcount($var)'.
Yeah, those sound like good additions. Currently Devel::Refcount provides an SvREFCNT wrapper; but maybe Scalar::Util would be a better place for it. -- Paul Evans


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.