aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/FakeQ.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-06-07 17:11:50 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-06-07 17:11:50 +0100
commit891428159dd27e5648676b7b9b51c5a2fe2f83ed (patch)
tree1aa9862e3ab0cd981f0979ce1b29610e4b967657 /perllib/FixMyStreet/FakeQ.pm
parent0f7de6563d4c96fa1ec9c429cca7e42259e25422 (diff)
Remove fake_q and most of now-unused Page.pm.
Diffstat (limited to 'perllib/FixMyStreet/FakeQ.pm')
-rw-r--r--perllib/FixMyStreet/FakeQ.pm60
1 files changed, 0 insertions, 60 deletions
diff --git a/perllib/FixMyStreet/FakeQ.pm b/perllib/FixMyStreet/FakeQ.pm
deleted file mode 100644
index 19f5ab32b..000000000
--- a/perllib/FixMyStreet/FakeQ.pm
+++ /dev/null
@@ -1,60 +0,0 @@
-package FixMyStreet::FakeQ;
-
-use strict;
-use warnings;
-use Carp;
-
-=head1 NAME
-
-FixMyStreet::FakeQ - adaptor object to ease code transition
-
-=head1 DESCRIPTION
-
-The old code uses '$q' everywhere - partly to passaround which cobrand is in
-use, partly to give access to the request query parameters and partly as a
-scratch pad.
-
-This object lets us fake this behaviour in a structured way so that the new
-Catalyst based code can call the old CGI code with no need for changes.
-
-Eventually it will be phased out.
-
-=head1 METHODS
-
-=head2 new
-
- $fake_q = FixMyStreet::FakeQ->new( $args );
-
-Create a new FakeQ object. Checks that 'site' argument is present and corrects
-it if needed.
-
-=cut
-
-sub new {
- my $class = shift;
- my $args = shift || {};
-
- croak "required argument 'site' missing" unless $args->{site};
- $args->{site} = 'fixmystreet' if $args->{site} eq 'default';
-
- $args->{params} ||= {};
-
- return bless $args, $class;
-}
-
-=head2 param
-
- $val = $fake_q->param( 'key' );
-
-Behaves much like CGI's ->param. Returns value if found, or undef if not.
-
-=cut
-
-sub param {
- my $self = shift;
- my $key = shift;
-
- return $self->{params}->{$key};
-}
-
-1;