I'm in the process of moving some websites from an old webserver to a new webserver. The old webserver uses Perl 5.8, the new webserver uses Perl 5.28. One of the differences between the two is that on 5.8, the directory a script is running from is included by default in @INC. Not so with 5.28. This means that cgi scripts that "require" local files are throwing an error.
I know that I can add these lines to a script to solve the problem:
use FindBin qw( $RealBin );
use lib $RealBin;
but the problem with this is, that I need to do this for a a lot of scripts.
Is there a way I can add the current directory (.) to @INC for all scripts in one go? Preferably for the www-data user only?