Don't trap the context in a closure. Also, better to just add the https
in production patch instead of checking for debug mode.
$c->stash(alliances => \@alliances);
}
$c->stash(alliances => \@alliances);
}
+sub sslurl {
+ return $_[0];
+}
+
sub auto : Private {
my ($self, $c) = @_;
my $dbh = $c ->model;
$c->stash(dbh => $dbh);
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'});
$dbh->do(q{SET timezone = 'GMT'});