Type::Tiny::Manual::NonOO - Type::Tiny in non-object-oriented code
Although Type::Tiny was designed with object-oriented programming in mind, especially Moose-style classes and roles, it can be used in procedural and imperative programming.
If you have read Type::Tiny::Manual::UsingWithMoo, you should understand how Type::Params can be used to validate method parametters. This same technique can be applied to regular subs too; just don't
$self. More information about checking parameters can be found in Type::Tiny::Manual::Params.
assert_* functions exported by type libraries may be useful in non-OO code too. See Type::Tiny::Manual::UsingWithMoo3.
Here's your next step:
Squeeze the most out of your CPU.
Toby Inkster <firstname.lastname@example.org>.
This software is copyright (c) 2013-2014, 2017-2019 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.