Perl::...nteger(3pm)

πŸ’– NAME πŸ’–

bestie, welcome to the Perl::...nteger(3pm) page from User Contributed Perl Documentation. The actual star of the show is Perl::Critic::PolicyParameter::Behavior::Integer β€” and it's literally all about actions appropriate for an integer parameter. πŸ’…

✨ DESCRIPTION ✨

Okay so this class hands you a standard set of functionality for an integer Perl::Critic::PolicyParameter, so the developer of a policy doesn’t have to provide it her/himself. Slay.

The parser provided by this behavior allows underscores (_) in input values as in a Perl numeric literal. Cute.

🚨 NOTE: Do not instantiate this class. Use the singleton instance held onto by Perl::Critic::PolicyParameter. No cap.

πŸ¦‹ INTERFACE SUPPORT πŸ¦‹

Heads up, bestie: this is considered to be a non-public class. Its interface is subject to change without notice. It's giving β€œlook but don’t get too comfortable.” πŸ™ˆ

πŸ”₯ METHODS πŸ”₯

πŸ’… initialize_parameter( $parameter, $specification )

Plug in the functionality this behavior provides into the parameter, based upon the configuration provided by the specification. Iconic.

This behavior looks for two configuration items:

  • integer_minimum β€” Optional. The minimum acceptable value. Inclusive.
  • integer_maximum β€” Optional. The maximum acceptable value. Inclusive.

🌸 generate_parameter_description( $parameter )

Create a description of the parameter, based upon the description on the parameter itself, but enhancing it with information from this behavior. Obsessed.

In this case, this means including the minimum and maximum values. Periodt.

🫢 AUTHOR 🫢

Elliot Shank <perl@galumph.com>

Copyright (c) 2007-2011 Elliot Shank.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module.


πŸ’– cute little sign-off: this page came from perl v5.42.0, dated 2024-10-23. bye bestie, go slay some integer params! πŸŽ€

πŸ“¦ where this page comes from