I was wondering if anyone had run into any trouble with compilied regexps and closures in perl 5.6.1?
I have found a bug that disappears in perl 5.8.8, but does show up in perl 5.6.1. Sadly, I do not have a small encapsulated example.
I have a subroutine called FileParse that takes a regexp to be compiled, a filename, and a code reference. The FileParse compiles the regexp and stores the result ina lexical variable. It than splits the input file according the regexp and sends the split line to the supplied subroutine as arguments.
However, I have found then when I nest calls to FileParse in perl 5.6.1, the inner call to FileParse seems to obliterate the outer FileParse's compiled regexp. And yes, I am using a lexical to contain the compiled regexp. The result, when the inner and outer regexp differ, the outer parse fails after the first line!
Any suggestions or hints would be greatly appreciated.