aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@mysociety.org>2012-04-17 17:47:06 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-04-26 12:24:37 +0100
commit2a7d70db634b1e8a5f32d99c34bf682ca7dc3a42 (patch)
treea3f73cc8b3d5a133bffb42c72fb6fb2c5c786868
parent3f79008df3d35f1458e33c28b7d3e8ba55376add (diff)
initial go at working round FindBin and Carp issues
-rwxr-xr-xweb/fixmystreet_app_cgi.cgi7
-rwxr-xr-xweb/fixmystreet_app_fastcgi.cgi6
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;