freebsd-ports/devel/p5-Sub-Delete/pkg-descr
Martin Wilke 4f9a4470e1 This module provides one function, delete_sub, that deletes the
subroutine whose name is passed to it. (To load the module without
importing the function, write use Sub::Delete();.)

This does more than simply undefine the subroutine in the manner of
undef &foo, which leaves a stub that can trigger AUTOLOAD (and,
consequently, won't work for deleting methods). The subroutine is
completely obliterated from the symbol table (though there may be
references to it elsewhere, including in compiled code).

WWW:	http://search.cpan.org/dist/Sub-Delete/

PR:		ports/128899
Submitted by:	Gea-Suan Lin <gslin at gslin.org>
2008-11-21 20:44:48 +00:00

11 lines
550 B
Text

This module provides one function, delete_sub, that deletes the
subroutine whose name is passed to it. (To load the module without
importing the function, write use Sub::Delete();.)
This does more than simply undefine the subroutine in the manner of
undef &foo, which leaves a stub that can trigger AUTOLOAD (and,
consequently, won't work for deleting methods). The subroutine is
completely obliterated from the symbol table (though there may be
references to it elsewhere, including in compiled code).
WWW: http://search.cpan.org/dist/Sub-Delete/