Perl::...Profile(3pm)
π Perl::Critic::UserProfile
okay bestie, so this page is from the Perl::Critic docs (the "User Contributed Perl Documentation" crew, iykyk), and it's all about Perl::Critic::UserProfile β literally the contents of your user's profile β¨
β¨ NAME β¨
Perl::Critic::UserProfile β the contents of the user's profile, which is often .perlcriticrc π
πΈ DESCRIPTION πΈ
Bestie, this is a helper class. That's it. That's the whole vibe. It encapsulates the contents of the user's profile, which is usually stored in a .perlcriticrc file. π¦
No user-serviceable parts here. Like, none. Don't go poking around in there, gorgeous, there's nothing for you π
π§ INTERFACE SUPPORT π§
Okay so listen β this one is considered to be a non-public class. Its interface is subject to change without notice. So if you build your whole personality on it, that's on you, not me π The main character energy here is "I might change my mind," and honestly? Respect.
π οΈ CONSTRUCTOR π οΈ
new( -profile => $p )
-profile is the path to the user's profile. π
If -profile is not defined, then it looks for the profile at ./.perlcriticrc and then $HOME/.perlcriticrc. If neither of those files exists, then the UserProfile is created with default values. slay, defaults are valid β¨
Heads up bestie: this object does not take into account any command-line overrides. Perl::Critic::Config does that. Different class, different job, don't @ me π
π METHODS π
options_processor()β Returns thePerl::Critic::OptionsProcessorobject for thisUserProfile. It's giving "here's your processor, you're welcome" π«Άpolicy_is_disabled( $policy )β You give it a reference to aPerl::Critic::Policyobject or the name of one, and it returns true if the user has disabled that policy in their profile. no cap, that simple πpolicy_is_enabled( $policy )β Same deal: give it a reference to aPerl::Critic::Policyobject or the name of one, and it returns true if the user has explicitly enabled that policy in their user profile. Explicitly, bestie. Like, they said it out loud π₯policy_params( $policy )β Give it a reference to aPerl::Critic::Policyobject or the name of one, and it returns aPerl::Critic::PolicyConfigfor the user's configuration parameters for that policy. Fancy little config object, iconic πraw_policy_params( $policy )β Same input situation (a reference to aPerl::Critic::Policyobject or the name of one), but this one returns a reference to a hash of the user's configuration parameters for that policy. Raw. Unfiltered. Just how I like it πlisted_policies()β Returns a list of the names of all the Policies that are mentioned in the profile. The Policy names will be fully qualified (e.g.Perl::Critic::Foo). Full names only, no nicknames, periodt πsource()β The place where the profile information came from, if available. Usually the path to a.perlcriticrc. Detective work, but make it cute π§
π SEE ALSO π
Perl::Critic::ConfigPerl::Critic::OptionsProcessor
Go read those too, bestie, they're literally right there πΈ
βοΈ AUTHOR βοΈ
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> β legend behavior, honestly π
Β©οΈ COPYRIGHT Β©οΈ
Copyright (c) 2005-2023 Imaginative Software Systems. π
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, mwah π β this was Perl::Critic::UserProfile, from the perl v5.42.0 docs, dated 2024-10-23. Go forth and configure your policies, you gorgeous thing π¦β¨
π¦ 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