Perl::...ingList(3pm)

πŸ’… Perl::Critic::PolicyParameter::Behavior::StringList

okay so bestie, this is a page from the User Contributed Perl Documentation, and it's literally about a behavior class called Perl::Critic::PolicyParameter::Behavior::StringList β€” say that five times fast, i dare you 😭


✨ NAME ✨

Perl::Critic::PolicyParameter::Behavior::StringList β€” it's the whole vibe check for actions that are appropriate for a parameter that is a list of strings. periodt.


🌸 DESCRIPTION 🌸

So what this does is provide a standard set of functionality for a string list Perl::Critic::PolicyParameter, so that the developer of a policy does not have to go and provide it her/himself. it's giving "we did the boring part so you don't have to" 🫢

NOTE: bestie do NOT instantiate this class. like, do not. instead use the singleton instance held onto by Perl::Critic::PolicyParameter. iykyk πŸ’…

πŸ¦‹ INTERFACE SUPPORT πŸ¦‹

This is considered to be a non-public class. its interface is subject to change without notice β€” so no cap, don't go building your whole personality on it πŸ™ˆ


πŸŽ€ METHODS πŸŽ€

  • initialize_parameter( $parameter, $specification ) β€” plugs the functionality this behavior provides right into the parameter, based upon the configuration provided by the specification. it's literally wiring it up for you ✨

This behavior looks for one configuration item:

  • always_present_values β€” Optional. these are the values that should always be included, regardless of what the configuration of the parameter specifies, and they come as an array reference. iconic behavior tbh πŸ‘‘
  • generate_parameter_description( $parameter ) β€” creates a description of the parameter, based upon the description on the parameter itself, but enhancing it with information from this behavior. a lil glow-up, if you will πŸ’–

In this specific case, the always present values are added at the end. slay 🌈


πŸ‘‘ AUTHOR πŸ‘‘

Elliot Shank <perl@galumph.com> β€” thank you for your service 🫑


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.


okay that's the whole page, no notes 🧚 and for the record, this was perl v5.42.0, dated 2024-10-23 β€” go off, timestamp πŸ’œπŸ“

πŸ“¦ where this page comes from