aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/Page.pm5
-rw-r--r--perllib/Standard.pm5
2 files changed, 6 insertions, 4 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm
index bdee4ec25..21771eab3 100644
--- a/perllib/Page.pm
+++ b/perllib/Page.pm
@@ -6,7 +6,7 @@
# Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: Page.pm,v 1.176 2009-09-10 12:04:19 louise Exp $
+# $Id: Page.pm,v 1.177 2009-09-15 13:57:01 louise Exp $
#
package Page;
@@ -42,7 +42,8 @@ use mySociety::WatchUpdate;
use mySociety::Web qw(ent NewURL);
BEGIN {
- mySociety::Config::set_file("$FindBin::Bin/../conf/general");
+ (my $dir = __FILE__) =~ s{/[^/]*?$}{};
+ mySociety::Config::set_file("$dir/../conf/general");
}
my $lastmodified;
diff --git a/perllib/Standard.pm b/perllib/Standard.pm
index 000b16169..2a776e8c3 100644
--- a/perllib/Standard.pm
+++ b/perllib/Standard.pm
@@ -7,7 +7,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: Standard.pm,v 1.2 2008-10-09 14:20:54 matthew Exp $
+# $Id: Standard.pm,v 1.3 2009-09-15 13:57:01 louise Exp $
use strict;
use warnings;
@@ -29,7 +29,8 @@ sub import {
unless ($db && $db eq '-db') {
use mySociety::Config;
use mySociety::DBHandle qw(dbh);
- mySociety::Config::set_file("$FindBin::Bin/../conf/general");
+ (my $file = __FILE__) =~ s{/[^/]*?$}{};
+ mySociety::Config::set_file("$file/../conf/general");
mySociety::DBHandle::configure(
Name => mySociety::Config::get('BCI_DB_NAME'),
User => mySociety::Config::get('BCI_DB_USER'),