New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blessed anonymous subroutines not reliably deterministically destroyed. #17111
Comments
From @demerphqThe following two one liners should output the same thing, in This potentially could screw up code that is trying to do "ScopeExit" $ perl -le'sub DestroyNow::DESTROY { print "destroying $_[0] in destroying DestroyNow=CODE(0x8bc6f8) in DESTRUCT $ perl -le'sub DestroyNow::DESTROY { print "destroying $_[0] in I'm told this is an optimisation, but I dont think the optimisation is The tested Perl was 5.18.4, but I have replicated this behavior on This is perl 5, version 18, subversion 4 (v5.18.4) built for x86_64-linux Copyright 1987-2013, Larry Wall Perl may be copied only under the terms of either the Artistic License or the Complete documentation for Perl, including FAQ lists, should be found on -- |
From @tonycozOn Thu, 25 Jul 2019 03:38:34 -0700, demerphq wrote:
This behaviour has been around since at least 5.6, and I expect since 5.000, so I suspect fixing it might break some code. Fixing it would be kind of messy, if pp_anoncode sees that the CV in the pad is blessed, it would need to clone the SV, replace that in the pad and turn the CvCLONE() flag on so that future referents are cloned. cv_clone() would have to handle cloning a CV without a pad. Tony |
The RT System itself - Status changed from 'new' to 'open' |
Migrated from rt.perl.org#134313 (status was 'open')
Searchable as RT134313$
The text was updated successfully, but these errors were encountered: