Tuesday, October 25, 2011

Small script to test perl module

To test any perl module, just put below lines in a file, make it executable (chmod +x) and run it (./).

#!/usr/bin/perl
use DBD-Pg;
print "No errors!\n"
where DBD-Pg is example of perl module. This script will return "No errors!" if the module is available. If the module is not installed, an error like "Can't locate ...." will appear instead.

0 comments: