FU::Validate: Add module + integrate with FU
Copied from TUWF::Validate with a few small changes. I have a few more features planned, but let's see how this goes first. It's been an incredibly useful module in the past, I'm not sure right now if I had ideas for potential improvements at some point, will need to check notes.
This commit is contained in:
parent
c7a3415485
commit
69262992ca
6 changed files with 1228 additions and 7 deletions
|
|
@ -189,6 +189,7 @@ static int fu_2bool(SV *val) {
|
|||
HV *stash = SvSTASH(rv);
|
||||
/* Historical: "JSON::XS::Boolean", not used by JSON::XS since 3.0 in 2013 */
|
||||
if (stash == gv_stashpvs("JSON::PP::Boolean", 0) /* Also covers Types::Serialiser::Boolean and used by a bunch of other modules */
|
||||
|| stash == gv_stashpvs("boolean", 0)
|
||||
|| stash == gv_stashpvs("Mojo::JSON::_Bool", 0)
|
||||
|| stash == gv_stashpvs("JSON::Tiny::_Bool", 0))
|
||||
return !!SvIV(rv);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue