in reply to Re^2: Why $FIle::Find::prune = 1 returns used only once error
in thread Why $FIle::Find::prune = 1 returns used only once error
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Why $FIle::Find::prune = 1 returns used only once error
by h2 (Beadle) on Apr 18, 2021 at 19:02 UTC |