diff options
author | Struan Donald <struan@mysociety.org> | 2012-04-17 17:47:06 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-04-26 12:24:37 +0100 |
commit | 2a7d70db634b1e8a5f32d99c34bf682ca7dc3a42 (patch) | |
tree | a3f73cc8b3d5a133bffb42c72fb6fb2c5c786868 | |
parent | 3f79008df3d35f1458e33c28b7d3e8ba55376add (diff) |
initial go at working round FindBin and Carp issues
-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; |