Background
The perl
command has several idiot-proofing command line options described in perldoc perlrun
:
-c causes Perl to check the syntax of the program and then exit without executing it.
-w prints warnings about dubious constructs, such as variable names that are mentioned only once and scalar variables that are used before being set, etc.
-T forces "taint" checks to be turned on so you can test them.
After reading through these options, I could not find one that detects undefined functions. For example, I had a function I used called NFD()
that imports the Unicode::Normalize
package. However, being a perl novice, I did not know if this was already under the fold of the standard perl library or not. And perl -c
nor any of the other options uncovered this error for me, rather a coworker noticed that it was somehow undefined (and not inside the standard libraries). Therefore, I was curious about the following:
Question
Is there an option in the perl
command to automatically detect if there is an undefined function not already inside an imported package?