Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Type::Tiny and anyOf, oneOf

by choroba (Archbishop)
on Feb 02, 2021 at 13:29 UTC ( #11127813=note: print w/replies, xml ) Need Help??


in reply to Type::Tiny and anyOf, oneOf

Not directly answering your question, but have you considered Cpanel::JSON::XS::Type?
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: Type::Tiny and anyOf, oneOf
by 1nickt (Abbot) on Feb 02, 2021 at 14:36 UTC

    Thanks choroba, I was not aware of this module. Looks like it could be useful, but in this case I am not producing or deserializing JSON, just wanting to validate a subroutine's args.


    The way forward always starts with a minimal test.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11127813]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2021-04-17 05:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?