[wellylug] Perl on server
Kevin O'Riordan
kfor at compsoc.com
Mon Dec 8 17:07:51 NZDT 2008
>>> #!/usr/local/bin/perl
>> you might need to edit the first line to become the right path for
>> your perl executable
> I'm aware of the path requirement, thanks.
As a by-the-way, the perlrun(1) manpage suggests using
#!/usr/bin/env perl
or an ugly shell eval/exec hack, to avoid explicitly specifying the
path to the perl binary.
To check what modules you're missing, something like:
( cd /path/to/perl/scripts &&
find ./ -name '*.pl' -print0 \
| xargs -r0 egrep '^use ' \
| sort | uniq \
| while read use_line
do
perl -e "$use_line" 2>/dev/null
if [ $? -eq 0 ]
then
echo " '$use_line' compiles, at least"
else
echo ">> '$use_line' failed - module missing?" >&2
fi
done
)
hth,
Kev
More information about the wellylug
mailing list