in reply to Re^4: Dynamically Changing Your Namespace
in thread Dynamically Changing Your Namespace

using a module for these tasks actually *adds* complexity to your code

Well, yes and no. It adds complexity and also adds insurance against bitrot. The price paid turns out to be a win if there was an unforseen set of circumstances that could cause the technique to fail, e.g. funky stuff involving lazy loading or what have you.

With a module, the extra level of indirection gives you a chance to come up with a fix, safe in the knowledge that anything that uses it will inherit the improvement. Doing this in bare code means you have to go and hunt it down in the codebase if you ever need to fix it.

• another intruder with the mooring in the heart of the Perl

  • Comment on Re^5: Dynamically Changing Your Namespace