NAME
Sub::Remove - Remove a subroutine from the symbol table and its associated CODE glob
SYNOPSIS
use Sub::Remove qw(sub_remove);
# In a different class
sub_remove('sub_name', 'My::Class);
# In main
sub_remove('sub_name');
DESCRIPTION
Removes a subroutine (function or method) from the namespace.
METHODS
sub_remove($sub_name, $class)
Removes a sub and all traces to it.
Parameters:
$sub_name
Mandatory, String: The name of the subroutine to remove.
$class
Optional, String: The name of the class to remove the symbol from. Defaults to main
if not sent in.
Returns: True (1
) upon success.
AUTHOR
Steve Bertrand, <steveb at cpan.org>
LICENSE AND COPYRIGHT
Copyright 2022 Steve Bertrand.
This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at: