Coming from a C++ background, I religiously use the use strict and use warnings features of Perl:
#!/usr/bin/perl -w
use strict;
use warnings;
$foo = 1; #Throws "$foo" requires explicit package name error
foobar( 1 );
The use strict construct is immensely helpful to catch errors when you mistype a variable name. Is there an equivalent construct to catch mistyped function names? In the above example, it would be great if there was something like perl -c that caught the fact that there is no foobar function available to call. Of course running the script throws an Undefined subroutine error, but I would like to catch it sooner.
Try this:
This uses the B::Lint module.