in reply to Re: File::Find managing the %options versus \&wanted dichotomy
in thread File::Find managing the %options versus \&wanted dichotomy

When testing your suggestion, it's true I didn't get a warning. I got a fatal error instead:
perl -e 'use File::Find; no warnings 'File::Find'; @fred = ( $ENV{ AC_ +SYSTEM } ); find wanted => undef(), @fred;'
produced
unknown warnings category 'File::Find' at -e line 1 BEGIN failed--compilation aborted at -e line 1.
But more to the point, if it's less code to write when you don't use the module, why bother?

One world, one people

Replies are listed 'Best First'.
Re^3: File::Find managing the %options versus \&wanted dichotomy
by bmann (Priest) on Aug 18, 2005 at 17:23 UTC

    You must be using 5.6, right? My version of warnings with 5.8.7 is 1.09, with 5.6.1 there is no version number and it doesn't allow you to suppress warnings:(

    But more to the point, if it's less code to write when you don't use the module, why bother?

    I bother because File::Find handles things like symlinks without me having to think about it. I prefer peer tested, "correct" code to "short" code any time. (That last sentence is about my code, not a criticism of yours.)

      What I was trying to point out is that in the example, slightly more personal "untested" code, to use your criteria, needed to be written when interfacing to the File module than using a glob and recursion. There was therefore no saving achieved by using the module. And is a module better than a function like glob?

      I feel that the "module" button appears almost to be a kneejerk reaction and I am trying to open some minds.

      One world, one people