Vadim Belman <vr...@lflat.org> wrote:

>> Joseph Brenner <doom...@gmail.com> wrote:
>>
>>> I just gave a few other variants a try-- passing a junction in a
>> variable, passing a code block containing a [junction]-- without any
>> luck.

> To my view, this behavior of File::Find is going against DWIM and is
> certainly LTA.

Thanks, that's certainly my impression, at least in this case.

> Anyway, what you you probably is looking for is something like
>
> exclude => { $_ ~~ any(@exclude) }

Ah, yes, that works:

    my @files = find( dir => $loc, type => 'file', exclude => { $_ ~~
any(@exclude) } );

And I see this works, too:

    my @files = find( dir => $loc, type => 'file', exclude => * ~~
any(@exclude) );

> BTW, the only thing File::Find needs to work with junctions is to declare
> :$exclude as Mu. In this case the call to find will not be auto-threaded.

That's an interesting point.  I'll think about opening an issue with
File::Find, it might be worth at least thinking about making that
change.

Reply via email to