in reply to Require into package

I think this is a design problem and that's why it feels hacky. Why do you set a global variable from a required package? Instead, I would give Insert::Foo a function/method to return whatever $foo needs to be (perhaps this is set according to some config?) and use that to set a local variable in the clients.