diff options
-rwxr-xr-x | web/fixmystreet_app_cgi.cgi | 7 | ||||
-rwxr-xr-x | web/fixmystreet_app_fastcgi.cgi | 6 |
2 files changed, 9 insertions, 4 deletions
diff --git a/web/fixmystreet_app_cgi.cgi b/web/fixmystreet_app_cgi.cgi index 7d60ce673..dd0984e15 100755 --- a/web/fixmystreet_app_cgi.cgi +++ b/web/fixmystreet_app_cgi.cgi @@ -1,8 +1,11 @@ #!/usr/bin/env perl BEGIN { # set all the paths to the perl code - use FindBin; - require "$FindBin::Bin/../setenv.pl"; + use File::Spec; + use File::Basename; + my $root = dirname(File::Spec->rel2abs(__FILE__)); + + require "$root/../setenv.pl"; } use Catalyst::ScriptRunner; diff --git a/web/fixmystreet_app_fastcgi.cgi b/web/fixmystreet_app_fastcgi.cgi index 1059cbd34..08504f8f4 100755 --- a/web/fixmystreet_app_fastcgi.cgi +++ b/web/fixmystreet_app_fastcgi.cgi @@ -1,8 +1,10 @@ #!/usr/bin/env perl BEGIN { # set all the paths to the perl code - use FindBin; - require "$FindBin::Bin/../setenv.pl"; + use File::Spec; + use File::Basename; + my $root = dirname(File::Spec->rel2abs(__FILE__)); + require "$root/../setenv.pl"; } use Catalyst::ScriptRunner; |