develooper Front page | perl.perl5.porters | Postings from May 2013

Re: [perl #117793] Extend SvREFCNT* to work on any perl variable type

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
May 13, 2013 18:06
Subject:
Re: [perl #117793] Extend SvREFCNT* to work on any perl variable type
Message ID:
20130513180609.GO3729@plum.flirble.org
On Mon, May 13, 2013 at 01:36:06PM -0400, bulk88 wrote:
> Nicholas Clark wrote:
> > 
> > Yes. It's always going to be possible for people to use (or write) code
> > to mess with the internals, such as reference counts.
> > 
> > But I'm really not convinced that we should be offering documented functions
> > in the default installation which offer such dangerous direct unguarded
> > access to the internals. If people want to live dangerously, they should
> > at least have to install an appropriate module from CPAN.
> > 
> > Nicholas Clark
> 
> The refcount checkers from Perl lang are useful to prove in a test that 
> a leak was fixed.

Agree, in that I could see that the perl core is reading reference counts in
tests to check them. But not changing them. I went for a look with
grep.cpan.me, and as far as I can tell the pretty much only place doing this
in tests is the perl core. But the core doesn't need to install self-test
infrastructure, just to have it available during testing.

(That's not an argument that everything must change. Just a thought that
things are not as constrained as they might seem)

Nicholas Clark

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About