Skip Menu |

This queue is for tickets about the IO-Compress-Base CPAN distribution.

Report information
The Basics
Id: 35954
Status: resolved
Priority: 0/
Queue: IO-Compress-Base

People
Owner: Nobody in particular
Requestors: Jeremy [...] marzhillstudios.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 2.006
  • 2.008
  • 2.009
  • 2.010
Fixed in: 2.011



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.
Thanks for the bug report. I amazed that bug hasn't been spotted till now. I'm doing an upload to CPAN today anyway, so this will be sorted in version 2.011. cheers Paul