From 5f1d45bbb7b75b5dfe38bc7d31aabfaa71f7df37 Mon Sep 17 00:00:00 2001 From: swaggboi Date: Tue, 9 Mar 2021 21:31:15 -0500 Subject: [PATCH] Use stash() instead of my %serverSide hash --- www-swagg.pl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/www-swagg.pl b/www-swagg.pl index eba3f1a..b86eb45 100755 --- a/www-swagg.pl +++ b/www-swagg.pl @@ -20,13 +20,12 @@ get '/' => sub { my $count = format_number time; # Grab epoch and add commas my $fortune = `/usr/games/fortune` || `fortune` || "huh??\n"; - # Gather all our server-side stuff - my %serverSide = ( + $c->stash( count => $count, fortune => $fortune ); - $c->render(%serverSide); + $c->render(); } => 'index'; # Deprecation of IE page @@ -48,7 +47,7 @@ get '/ula6' => sub { # Check the MAC $mac = ($c->param('macaddr')) ? lc $c->param('macaddr') : ''; - if ($mac =~ /$RE{net}{MAC}/) { + if ($mac =~ /$RE{'net'}{'MAC'}/) { # Local vars for this bit my ( $binfield,