logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

GraphQL::MaybeTypeCheck - Conditional type-checking at runtime

Description

       This module optionally enables type-checking in the caller as implemented by Function::Parameters and
       Return::Type depending on whether Devel::StrictMode is activated.

       "Devel::StrictMode"ON

       When Devel::StrictMode is active, this module will import Function::Parameters into the caller with its
       default configuration. As of writing, this includes checking both argument count and type.

       When in strict mode this also "require"s Return::Type which registers the "ReturnType" attribute.

       "Devel::StrictMode"OFF

       When strict mode is inactive this module still imports "Function::Parameters" into the caller however it
       sets "fun" and "method" to lax mode and disables argument type checking.

       This also installs a no-op "ReturnType" attribute so the existing syntax isn't broken.

perl v5.34.0                                       2022-03-27                       GraphQL::MaybeTypeCheck(3pm)

Name

       GraphQL::MaybeTypeCheck - Conditional type-checking at runtime

Synopsis

         use GraphQL::MaybeTypeCheck;

         method foo(
           $arg1 Str,
           $arg2 Int
         ) :ReturnType(Map[Str, Int]) {
           # ...
         }

See Also