aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Standard.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-06-10 14:56:00 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-06-10 14:56:00 +0100
commit391ca1c469d93bb2c4798cc15e56fc495b5e80dd (patch)
tree6bc90fae589de824095e668fbf510ef259935729 /perllib/Standard.pm
parent7c96f8ec61d6eddc211f3f0e71cdb276c6a5f773 (diff)
parent860383f0de3287b0666d64a3ffff3db3a0f087ae (diff)
Merge branch 'migrate_to_catalyst' into reportemptyhomes
Diffstat (limited to 'perllib/Standard.pm')
-rw-r--r--perllib/Standard.pm42
1 files changed, 0 insertions, 42 deletions
diff --git a/perllib/Standard.pm b/perllib/Standard.pm
deleted file mode 100644
index 571065c14..000000000
--- a/perllib/Standard.pm
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/usr/bin/perl
-#
-# Standard.pm:
-# Common headers for Perl files. Mostly in the main namespace on purpose
-# (Filter::Macro sadly didn't work, CPAN bug #20494)
-#
-# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
-# Email: matthew@mysociety.org; WWW: http://www.mysociety.org/
-#
-# $Id: Standard.pm,v 1.3 2009-09-15 13:57:01 louise Exp $
-
-use strict;
-use warnings;
-require 5.8.0;
-
-# Horrible boilerplate to set up appropriate library paths.
-use FindBin;
-use lib "$FindBin::Bin/../perllib";
-use lib "$FindBin::Bin/../commonlib/perllib";
-
-use Page;
-
-package Standard;
-
-sub import {
- my $package = shift;
- my $db = shift;
- unless ($db && $db eq '-db') {
- use mySociety::Config;
- use mySociety::DBHandle qw(dbh);
- (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'),
- Password => mySociety::Config::get('BCI_DB_PASS'),
- Host => mySociety::Config::get('BCI_DB_HOST', undef),
- Port => mySociety::Config::get('BCI_DB_PORT', undef)
- );
- *main::dbh = \&dbh;
- }
-}