Subject: | IO::Compress::Base::Common clobbers toplevel Validator package Namespace. |
IO::Compress::Base::Common clobbers toplevel Validator package Namespace.
I'm not sure why this module was coded this way but the code dynamically
overwrites Validator::new and several other Validator::* methods with
out and warning in the documentation or even the module files in the
distribution.
This code recently clobbered a Validator module in code I work on at
work and the bug was tricky to track down because it depended on which
of a set of modules where dynamically loaded and in which order.
Not only does this package potentially clobber someone elses namespace
but someone else might also clobber it's Validator::* methods on
accident. I would highly recommend changing the code to something along
the lines of IO::Compress::Base::Common::Validator or if that is too
long IO::Compress::Base::Validator. I'm sure it's only a matter of time
before other people run into the same problem.
At the very least change the documentation to warn users that this
module will have hidden namespace collisions with the Validator namespace.
I would supply a patch but I'm not sure yet if the proposed change would
affect upstream users of the class or not? I might yet do that anyway.