Given a supported type constraint name, such as "Int", returns
a coderef that can be used to validate a parameter against this
Returns undef if this module cannot provide a suitable coderef.
Like get_coderef_for but returns the name of such a sub as a string.
Returns undef if this module cannot provide a suitable sub name.
|Type::Tiny::XS::is_known($coderef)||Returns true if the coderef was provided by Type::Tiny::XS.|
To clarify, if you call get_subname_for("ArrayRef[Int]") in a script, this will return the name of a sub. That sub (which can be used to validate arrayrefs of integers) is now considered part of the supported API of Type::Tiny::XS until the script finishes running. Next time the script runs, there is no guarantee that the sub will continue to exist, or continue to do the same thing.
Please report any bugs to <http://rt.cpan.org/Dist/Display.html?Queue=Type-Tiny-XS>.
Toby Inkster <email@example.com> forked all this from Mouse::Util::TypeConstraints.
This software is copyright (c) 2014 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.
|perl v5.20.3||TYPE::TINY::XS (3)||2014-09-17|