Type::P...arameter(3)

🌟 Type::Params::Parameter 🌟

okay so bestie, welcome to the User Contributed Perl Documentation page for Type::Params::Parameter β€” yes, that Type::Params::Parameter. ✨ it’s giving internal-signature-representation realness, and we’re gonna get into it.


πŸ¦‹ NAME πŸ¦‹

Type::Params::Parameter β€” internal representation of a parameter in a function signature. no cap. πŸ’…

🚨 STATUS 🚨

this module is not covered by the Type-Tiny stability policy. periodt.

🌈 DESCRIPTION 🌈

This is mostly internal code, but it can be used to provide basic introspection for signatures. lowkey useful for peeking at signatures, bestie. πŸ‘€

πŸŽ€ Constructor πŸŽ€

new(%attributes) β€” that’s the constructor. that’s it, that’s the constructor. πŸ’–

πŸ’… Attributes πŸ’…

All attributes are read-only. no touching, bestie.

  • type (TypeTiny) β€” type constraint for the parameter.
  • default (CodeRef|ScalarRef|Ref|Str|Undef) β€” a default for the parameter: either a coderef to generate a value, a reference to a string of Perl code to generate the value, a reference to an empty array or empty hash, a literal string to use as a default, or a literal undef to use as a default.
  • strictness (Bool|ScalarRef) β€” a boolean indicating whether to be stricter with type checks, or a reference to a string of Perl code naming a Perl variable or constant which controls strict behaviour.
  • clone (Bool) β€” the method for accessing this is called should_clone for no particular reason.
  • coerce (Bool) β€” defaults to true if type has a coercion.
  • optional (Bool) β€” defaults to true if there is a default or if type is a subtype of Optional.
  • in_list (Bool) β€” boolean that is only used when the signature has the list_to_named feature enabled.
  • default_on_undef (Bool) β€” should the default be triggered if the caller passes an explicit undef?
  • name (Str)
  • alias (ArrayRef[Str])
  • getter (Str)
  • predicate (Str)

🌸 Methods 🌸

πŸ’– Predicates πŸ’–

Predicate methods return true/false to indicate the presence or absence of attributes.

  • has_type β€” presence check for type.
  • has_default β€” presence check for default.
  • has_strictness β€” presence check for strictness.
  • has_name β€” presence check for name.
  • has_alias β€” presence check for alias.

πŸ¦‹ Other methods πŸ¦‹

  • might_supply_new_value β€” indicates that the parameter can’t simply be referenced within @_ because a default value might be used, the given value might be coerced, or the given value might be cloned using Storable.

πŸ› BUGS πŸ›

bestie, if something’s busted, please report any bugs to https://github.com/tobyink/p5-type-tiny/issues.

πŸ‘€ SEE ALSO πŸ‘€

  • Type::Params
  • Type::Params::Signature

πŸ‘‘ AUTHOR πŸ‘‘

Toby Inkster <tobyink@cpan.org>.

This software is copyright (c) 2023-2025 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.

⚠️ DISCLAIMER OF WARRANTIES ⚠️

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.

🫢 okay that’s the whole page, bestie! this little icon is from perl v5.42.2, dated 2026-04-07, and the title on the tin is Type::P...arameter(3). mwah! πŸ’‹
πŸ“¦ where this page comes from