OC-PM: Follow up..

Andrew Sweger andrew at sweger.net
Wed Oct 8 17:47:53 CDT 2003


On Wed, 8 Oct 2003, Wilson, Douglas wrote:

> And just to save typing, especially on those 'or' or 'any' rules,
> I usually stick this at the top:
> 
> use constant FFR => 'File::Find::Rule';
> 
> so that those rules become:
> FFR->or(
>   FFR->blah_blah...,
>   FFR->blah_blah...,
> )-> etc...

Any reason not to do it like this?

 my $rule = File::Find::Rule->new;
 $rule->or($rule->new
                ->directory
                ->name('CVS')
                ->prune
                ->discard,
           $rule->new);

(taken from an example in the perldocs)

-- 
Andrew B. Sweger -- The great thing about multitasking is that several
                                things can go wrong at once.




More information about the Oc-pm mailing list