diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-11-09 18:08:05 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-11-09 18:08:05 +0000 |
commit | c0e4463163d4a9b9a8be073964ef960b114c9ea0 (patch) | |
tree | 8724404283e105fb04b857210825ec78cad1e7cb /perllib/FixMyStreet/App/Controller/Rss.pm | |
parent | 55fd02987a0816d9d1c8a76b67fa2d44f8d57264 (diff) |
Some fixes for when warnings are on during test run.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Rss.pm')
-rwxr-xr-x | perllib/FixMyStreet/App/Controller/Rss.pm | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Rss.pm b/perllib/FixMyStreet/App/Controller/Rss.pm index fe4b652ed..baaa3b927 100755 --- a/perllib/FixMyStreet/App/Controller/Rss.pm +++ b/perllib/FixMyStreet/App/Controller/Rss.pm @@ -106,10 +106,19 @@ sub local_problems_pc_distance : Path('pc') : Args(2) { } -sub local_problems : LocalRegex('^(n|l)/([\d.-]+)[,/]([\d.-]+)(?:/(\d+))?$') { +sub local_problems_dist : LocalRegex('^(n|l)/([\d.-]+)[,/]([\d.-]+)/(\d+)$') { my ( $self, $c ) = @_; + $c->forward( 'local_problems', $c->req->captures ); +} + +sub local_problems_no_dist : LocalRegex('^(n|l)/([\d.-]+)[,/]([\d.-]+)$') { + my ( $self, $c ) = @_; + $c->forward( 'local_problems', $c->req->captures ); +} + +sub local_problems : Private { + my ( $self, $c, $type, $a, $b, $d ) = @_; - my ( $type, $a, $b, $d) = @{ $c->req->captures }; $c->forward( 'get_query_parameters', [ $d ] ); $c->detach( 'redirect_lat_lon', [ $a, $b ] ) |