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
Nicholas Clark
May 13, 2013 18:06
Re: [perl #117793] Extend SvREFCNT* to work on any perl variable type
Message ID:
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, 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About