in reply to Re^2: Prune File Find search
in thread Prune File Find search

And I just found the bug too. In .\File-Find-Rule-0.10\t\File-Find-Rule.t there is a subroutine called 'run'. It says:

$expr =~ s~\\~~g if ($^O eq 'Win32' || $^O eq 'dos');
Which is wrong:
D:\>perl -e "print $^O" MSWin32 D:\>e:\perl805\bin\perl -e "print $^O" MSWin32
It should IMO read
$expr =~ s~\\~~g if ($^O eq 'MSWin32' || $^O eq 'dos');

And frankly given this bug I manifestly fail to see how it installed successfully on the systems you have listed. Are you sure you installed 0.10 which is the latest? Can you please prove your claim? Along with the value of $^O on your various installs?


---
demerphq

<Elian> And I do take a kind of perverse pleasure in having an OO assembly language...

• Update:  
Reported this to the author via RT.


Replies are listed 'Best First'.
Re: Re: Re^2: Prune File Find search
by DrHyde (Prior) on Jul 29, 2003 at 07:50 UTC
    if($^O =~ /Win32/ ... would probably be better, as I'm quite sure that Richard will have tested it on Windows at some point and found it to work as it is on some combination of perl and Windows.

    This won't clash with Cygwin, as in that case, $^O eq 'cygwin'.

      No, I'm afraid I didn't. I thank whoever it was for reporting the issue via rt.cpan.org, I'm just now working on an interim 0.11 release before going back to finishing off the shinier 0.20 branch.
      -- 
      Richard Clamp
Re^4: Prune File Find search
by particle (Vicar) on Jul 29, 2003 at 13:33 UTC

    indeed, you are correct. i do have File::Find::Rule installed, but t\File-Find-Rule.t does not match the date in the distro. i must have modified it when installing, and forgotten to submit a patch to rt. the line you mention reads, in my distro:

    $expr =~ s~\\~~g if ($^O =~ m/Win32/ or $^O eq 'dos');

    i believe this test is more accurate than that in the orginal distro (as it works for me.)

    ~Particle *accelerates*