in reply to Preventing used modules from leaking to main script

use and require load the module. Once the module is loaded, it's available to everyone. There's no propogation, since it's a global effect. Being a global effect, you can't make the module unavailable to main.

You could break IO::Socket::INET for everyone, though.

package MyModule; use IO::Socket::INET (); undef \&IO::Socket::INET::configure;

Update: s/new/configure/ in code block to prevent IO::Socket->new(Domain => AF_INET, ...).