From: Michael Andreen Date: Sun, 31 Aug 2008 10:45:32 +0000 (+0200) Subject: Fixed a memory leak. X-Git-Url: https://ruin.nu/git/?p=ndwebbie.git;a=commitdiff_plain;h=ff64efb53e6b0c64bf7f6f77470f402939c9333a Fixed a memory leak. Don't trap the context in a closure. Also, better to just add the https in production patch instead of checking for debug mode. --- diff --git a/lib/NDWeb/Controller/Root.pm b/lib/NDWeb/Controller/Root.pm index d337a29..7d5bf1c 100644 --- a/lib/NDWeb/Controller/Root.pm +++ b/lib/NDWeb/Controller/Root.pm @@ -119,16 +119,17 @@ sub listAlliances : Private { $c->stash(alliances => \@alliances); } +sub sslurl { + return $_[0]; +} + sub auto : Private { my ($self, $c) = @_; my $dbh = $c ->model; $c->stash(dbh => $dbh); - $c->stash(sslurl => sub { - $_[0]->scheme('https') unless $c->debug; - return $_[0]; - }); + $c->stash(sslurl => \&sslurl); $dbh->do(q{SET timezone = 'GMT'});