diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-08-15 22:23:44 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-08-16 21:37:11 +0100 |
commit | ab58ee1dcfc3e7a39b56df75ee9d9671a3fb57e1 (patch) | |
tree | fa8830c2ced4f762e5f9ad15269b19570af30222 /web/fixmystreet_app_cgi.cgi | |
parent | 5f419aa5574ed35c6fc326c472afea6d1ab591e7 (diff) |
Don't use FindBin before local::lib set up, as it can cause confusion due to it requiring Carp, and then some of Carp coming from global, some from local.
Diffstat (limited to 'web/fixmystreet_app_cgi.cgi')
-rwxr-xr-x | web/fixmystreet_app_cgi.cgi | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/web/fixmystreet_app_cgi.cgi b/web/fixmystreet_app_cgi.cgi index 7d60ce673..8c2535e83 100755 --- a/web/fixmystreet_app_cgi.cgi +++ b/web/fixmystreet_app_cgi.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::Basename qw(dirname); + use File::Spec; + my $d = dirname(File::Spec->rel2abs($0)); + require "$d/../setenv.pl"; } use Catalyst::ScriptRunner; |