Often if there's a bug in a module but the author is unreachable, or slow at updating it, the easiest thing to do is subclass the module. I've done this a number of times now, by just copy and pasting the method in question and adding my changes into a new module that has
@ISA = qw(BrokenModule);
Unfortunately the code above appears to be procedural, so it won't work there. But it's a useful technique for those who haven't heard of it before.