GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
GraphQL::MaybeTypeCheck(3) User Contributed Perl Documentation GraphQL::MaybeTypeCheck(3)

GraphQL::MaybeTypeCheck - Conditional type-checking at runtime

  use GraphQL::MaybeTypeCheck;

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

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.

2021-07-04 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.