Are you calling import in a BEGIN block? Using use implicitly wraps the require and import into a BEGIN block. If you are waiting to load File::Find until runtime, then the compiler's warning is correct: perl has not seen File::Find yet and your code only mentions File::Find::prune once.
The solution is to always call import in a BEGIN block, so the effects will be visible during the rest of the compilation.
In reply to Re^3: Why $FIle::Find::prune = 1 returns used only once error
by jcb
in thread Why $FIle::Find::prune = 1 returns used only once error
by h2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |