Use stash() instead of my %serverSide hash

This commit is contained in:
swagg boi 2021-03-09 21:31:15 -05:00
parent a2aeaa38c6
commit 5f1d45bbb7

View file

@ -20,13 +20,12 @@ get '/' => sub {
my $count = format_number time; # Grab epoch and add commas my $count = format_number time; # Grab epoch and add commas
my $fortune = `/usr/games/fortune` || `fortune` || "huh??\n"; my $fortune = `/usr/games/fortune` || `fortune` || "huh??\n";
# Gather all our server-side stuff $c->stash(
my %serverSide = (
count => $count, count => $count,
fortune => $fortune fortune => $fortune
); );
$c->render(%serverSide); $c->render();
} => 'index'; } => 'index';
# Deprecation of IE page # Deprecation of IE page
@ -48,7 +47,7 @@ get '/ula6' => sub {
# Check the MAC # Check the MAC
$mac = ($c->param('macaddr')) ? lc $c->param('macaddr') : ''; $mac = ($c->param('macaddr')) ? lc $c->param('macaddr') : '';
if ($mac =~ /$RE{net}{MAC}/) { if ($mac =~ /$RE{'net'}{'MAC'}/) {
# Local vars for this bit # Local vars for this bit
my ( my (
$binfield, $binfield,