|Don't ask to ask, just ask|
Perl 5.17 was released and "broke" my CPAN module File::Util. A patch was submitted through rt.cpan.org which I applied and will be uploading shortly, but this got things moving on some other bug reports that I've left alone for far too long... the issues weren't critical and I hadn't enough time I suppose. Either way, I'm recommitting myself to the maintenance and betterment of this module and that translates to resolving all the bugs.
This brings me to the question at hand. In CPAN bug report number 64775, someone reported that a certain behavior he/she expected was not being enforced by File::Util. I've looked at a patch that was submitted, but I wanted to ask the monastery what they think about the matter before I make a change that could have potentially far-reaching effects on lots of code out there which is using File::Util (a stable module since 2007).
The full details regarding the patch are visible here: https://rt.cpan.org/Ticket/Display.html?id=64775
A summary of the proposed patch, and a further proposal by myself is as follows: File::Util::list_dir() provides a means to list directory contents, and it accepts a regex pattern against which only files with names satisfying a successful match are returned. This works. Mostly. The problem identified in the original bug report is that the pattern isn't enforced on subdirectory contents when the list_dir() method is asked to recurse through subdirectories. Obviously this was an oversight on my part.
The proposed patch attempts to fix this by providing the user with means to supply patterns in a different and potentially ambiguous manner. The logic behind the necessity of the patch is sound. However I'm not wholly confident that the patch offers a complete solution to the problem.
In response to the bug report I included correspondence to submitter of the patch expressing my thoughts, which are open to the public view at the link I provided above. I respectfully ask for anyone who has interest in this to please take a look at the link to the bug report and my proposed solution, and kindly provide your own opinions.
Your opinions are warmly appreciated!
$ perl -MMIME::Base64 -e 'print decode_base64 "YWNlQHRvbW15YnV0bGVyLm1lCg=="'
In reply to Seeking your opinions on proposed patch to File::Util by Tommy