in reply to Re^6: Weird behavior of int()
in thread Weird behavior of int()
Having learned about these edge cases, now I need to go back through all the controllers I've written and fix:
because passing NaN to the controller would let a non-integer value leak through to the code beyond.my $count= int($c->request->params->{count}); $c->detach(HTTP => 422, ["Invalid count"]) if $count < 0 || $count > $limit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Weird behavior of int()
by syphilis (Archbishop) on May 24, 2024 at 04:41 UTC |