Skip Menu |

This queue is for tickets about the Sub-Delete CPAN distribution.

Report information
The Basics
Id: 133795
Status: new
Priority: 0/
Queue: Sub-Delete

People
Owner: Nobody in particular
Requestors: perl [...] toby.ink
Cc:
AdminCc:

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



Subject: There's still a reference held to deleted subs
Subject: destroyal.pl
use v5.16; use strict; use warnings; use Sub::Delete 'delete_sub'; use Devel::Refcount 'refcount'; package Foo { sub bar { 42 } } my $coderef = \&Foo::bar; # Refcount should be 2: # # - reference in $coderef # - reference in symbol table for Foo # print "THIS SHOULD BE 2: ", refcount( $coderef ), "\n"; delete_sub 'Foo::bar'; # Refcount should be 1: # # - reference in $coderef # print "THIS SHOULD BE 1: ", refcount( $coderef ), "\n";