Hello, Preface. `namespace::clean` is a module that erases symbols imported prior to its `use` line:
package Foo; use Scalar::Util qw(blessed); use namespace::clean; blessed ($x); # ok Foo->blessed; # nope, no such method There are also namespace::autoclean and namespace::sweep (at least) in the same `namespace` namespace. Now after looking at namespace::clean I came up with a variation that limits imports to its enclosing scope: package Foo; # no traces of blessed exist sub uses_blessed { use namespace::local; use Scalar::Util qw(blessed); blessed ($x); # ok Foo->blessed; # nope, no such method }; # no traces of blessed exist See more at http://prepan.org/module/nYiS6m8kTir However, I doubt about he name. Is it clear enough? Is it likely to clash with something else? Thank you. -- Konstantin S. Uvarin jabber: see <from> skype: kuvarin http://github.com/dallaylaen