Revert "-remove copypasta die error, it doesn't work here"

This didn't work, aggressivedly cleared legit worlde scores!

This reverts commit 0911066c20.
This commit is contained in:
peteyboy 2022-02-17 03:26:45 +00:00
parent 0911066c20
commit a249bb48d5

View File

@ -49,11 +49,8 @@ use Readonly;
#$wordle = ""; #$wordle = "";
} elsif ($method eq 'POST') { } elsif ($method eq 'POST') {
#textarea name, pull the value from POST and reload into textarea #textarea name, pull the value from POST and reload into textarea
if ( grep( /^wordle-result$/, $cgi->body_param_names) ) { #if no param exists, go down same path with default text as in GET case $wordle = $cgi->body_param('wordle-result');
$wordle = chomp($cgi->body_param('wordle-result'));
}else{
$wordle = $defaulttext;
}
#if input textarea not changed from default text, do nothing #if input textarea not changed from default text, do nothing
unless ($wordle =~ /\Q$defaulttext\E/) { unless ($wordle =~ /\Q$defaulttext\E/) {
#[Cc] /){ #cheat, if they put in something that looks like an RLE, pass output through #[Cc] /){ #cheat, if they put in something that looks like an RLE, pass output through
@ -70,6 +67,8 @@ use Readonly;
exit; exit;
} }
die "Invalid wordle parameter" unless length $wordle;
#Load template from DATA section and output #Load template from DATA section and output
my $mt = Mojo::Template->new(auto_escape => 1, vars => 1); my $mt = Mojo::Template->new(auto_escape => 1, vars => 1);
my $template = data_section __PACKAGE__, 'index.html.ep'; my $template = data_section __PACKAGE__, 'index.html.ep';
@ -84,7 +83,7 @@ use Readonly;
sub generate_rle { sub generate_rle {
my $headline = ""; my $headline = "";
my $rleline = ""; my $rleline;
my $rowcount; my $rowcount;
my $myline; my $myline;