> -----Original Message----- > From: perl-win32-users-boun...@listserv.activestate.com [mailto:perl- > win32-users-boun...@listserv.activestate.com] On Behalf Of > arvinport...@lycos.com > Sent: 13 December 2011 21:10 > To: kl...@psu.edu > Cc: perl-win32-users@listserv.ActiveState.com > Subject: Re: RE: File::Find::Rule problem > > > I have tried running both scripts without being able to reproduce the > > problem. But then I am running Perl 5.14.1 and File::Find::Rule > > version 0.33, so it could be version specific. > > > > I notice that the Changes file for the module has... > > > > 0.33 Monday 19th September, 2011 > > Fixes the case where name("foo(*") hits an error with mismatched > > parentheis. Reported by Jan Engelhardt. > > > > It might be worth upgrading File::Find::Rule to the later version > > (Perl as well, if you can). It might make a difference. > > > > HTH > > > > > > -- > > Brian Raven > > > > Thank you both so much for testing this. Nice to know I'm not crazy or > stupid - this time. I also realize I posted this to the win32 mailing > list by mistake, so double thanks for helping out. > > I've upgraded to version 0.33 and I'm getting better results with plain > strings, so yes, the version was the precise issue. I still can't make > it work reliably passing in qr// regular expressions though. I'm > creating a module for somebody else who's just learning perl. I want > them to be able to pass in plain strings to exclude directories with no > need to escape meta characters but also wanted to give the option to > pass in regular expressions in case that level of control might be > needed. So the plain string part is working perfectly now with the > upgrade. What I will do is create separate methods, one for plain > strings, the other for regex strings and compile the latter in the back > end as you do in your example.
There is no need to escape meta characters, or compile a string into a regex, as File::Find::Rule::name does that anyway to any parameter that isn't a regex (using Text::Glob::glob_to_regex - check the source). Can you say more about your problem with regular expressions? A small example perhaps? HTH -- Brian Raven Please consider the environment before printing this e-mail. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs