Based on your comments, here are some things you might find interesting:
Recent Perl versions have function signatures.
Have you tried the Test2 test suite? It’s a tremendous improvement over the previous system.
Type::Tiny is an amazing library that provides a rather nice type system.