Perl::...ration(3pm)
Hii bestie π welcome to the Perl::Critic::PolicyParameter::Behavior::Enumeration page β yep, the .3pm manual from the user-contributed Perl docs pile π
. Buckle up, this one is short and slays.
πΈ NAME πΈ
Perl::Critic::PolicyParameter::Behavior::Enumeration β Actions appropriate for an enumerated value. Periodt.
β¨ DESCRIPTION β¨
It provides a standard set of functionality for an enumerated Perl::Critic::PolicyParameter, so the developer of a policy does not have to provide it her/himself. Iconic.
π¨ NOTE, bestie: Do not instantiate this class. Use the singleton instance held onto by Perl::Critic::PolicyParameter. Thatβs the whole vibe. Donβt try to make your own.
π¦ INTERFACE SUPPORT π¦
Okay so important: this is considered to be a non-public class. Its interface is subject to change without notice. Not me warning you π. Treat it like a backstage pass, not a stable public API.
π₯ METHODS π₯
π initialize_parameter( $parameter, $specification ) π
Plug in the functionality this behavior provides into the parameter, based upon the configuration provided by the specification. Basically it wires the behavior into $parameter using whatever $specification says.
This behavior looks for two configuration items:
enumeration_valuesβ Mandatory. The set of valid values for the parameter, as an array reference. No cap, you gotta give it the list.enumeration_allow_multiple_valuesβ Optional, defaults tofalse. Should the parameter support a single value or accept multiple? Thatβs the question π .
π 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.
In this specific case, the universe of values is added at the end. Cute little bonus lore at the end of the description β¨.
π AUTHOR π
Elliot Shank <perl@galumph.com> β the icon behind this one π«Ά.
π COPYRIGHT π
Copyright (c) 2006-2023 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.
Thatβs the legal tea, bestie β keep it exactly as it is π.
Byeee π«Ά this page rode in with perl v5.42.0 and is dated 2024-10-23; the footer also calls it Perl::...ration(3pm) ππ
π¦ where this page comes from
- opensuse-leap 16.0: perl-Perl-Critic 1.156.0-bp160.1.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms