libnamespace-autoclean-perl | Perl module to remove all imported symbols at the end of the compile cycle | Mehr ...
namespace::autoclean is a handy module to keep your namespace clean by removing all imported symbols at the end of the current package's compile cycle. Perhaps most importantly, this means that imported functions will no longer be made accidentally accessible to users outside of your package via method invocations. . The way this is done at the end of the compile cycle but prior to execution means that functions will remain accessible for use inside your package, since function calls are resolved at compile time. For the most part, the only change that needs to be made is to load the module. . This module differs slightly from namespace::clean in that it cleans all imported functions, whether or not the imports happened prior to using the pragma. Things that "look" like a method will be left alone (Class::MOP is used for this feature).