diff options
author | Struan Donald <struan@exo.org.uk> | 2012-05-03 12:38:26 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-05-03 12:38:26 +0100 |
commit | 5617685e9f40c8e701b72b9b21377f6542ca3fd9 (patch) | |
tree | b0fca180aa7cd61fd40e953fadb1105a8096d893 | |
parent | 031506f44dcc515fc32bb262d25fbf20c2ff6666 (diff) |
fix findbin issues
-rwxr-xr-x | web/fixmystreet_app_cgi.cgi | 7 | ||||
-rwxr-xr-x | web/fixmystreet_app_fastcgi.cgi | 7 |
2 files changed, 10 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..63cb78918 100755 --- a/web/fixmystreet_app_fastcgi.cgi +++ b/web/fixmystreet_app_fastcgi.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; |