1Perl::Critic::UserProfiUlsee(r3pCmo)ntributed Perl DocumPeenrtla:t:iCornitic::UserProfile(3pm)
2
3
4
6 Perl::Critic::UserProfile - The contents of the user's profile, often
7 .perlcriticrc.
8
10 This is a helper class that encapsulates the contents of the user's
11 profile, which is usually stored in a .perlcriticrc file. There are no
12 user-serviceable parts here.
13
15 This is considered to be a non-public class. Its interface is subject
16 to change without notice.
17
19 "new( -profile => $p )"
20 -profile is the path to the user's profile. If -profile is not
21 defined, then it looks for the profile at ./.perlcriticrc and then
22 $HOME/.perlcriticrc. If neither of those files exists, then the
23 UserProfile is created with default values.
24
25 This object does not take into account any command-line overrides;
26 Perl::Critic::Config does that.
27
29 options_processor()
30 Returns the Perl::Critic::OptionsProcessor object for this
31 UserProfile.
32
33 policy_is_disabled( $policy )
34 Given a reference to a Perl::Critic::Policy object or the name of
35 one, returns true if the user has disabled that policy in their
36 profile.
37
38 policy_is_enabled( $policy )
39 Given a reference to a Perl::Critic::Policy object or the name of
40 one, returns true if the user has explicitly enabled that policy in
41 their user profile.
42
43 policy_params( $policy )
44 Given a reference to a Perl::Critic::Policy object or the name of
45 one, returns a Perl::Critic::PolicyConfig for the user's
46 configuration parameters for that policy.
47
48 raw_policy_params( $policy )
49 Given a reference to a Perl::Critic::Policy object or the name of
50 one, returns a reference to a hash of the user's configuration
51 parameters for that policy.
52
53 listed_policies()
54 Returns a list of the names of all the Policies that are mentioned
55 in the profile. The Policy names will be fully qualified (e.g.
56 Perl::Critic::Foo).
57
58 source()
59 The place where the profile information came from, if available.
60 Usually the path to a .perlcriticrc.
61
63 Perl::Critic::Config, Perl::Critic::OptionsProcessor
64
66 Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>
67
69 Copyright (c) 2005-2023 Imaginative Software Systems.
70
71 This program is free software; you can redistribute it and/or modify it
72 under the same terms as Perl itself. The full text of this license can
73 be found in the LICENSE file included with this module.
74
75
76
77perl v5.38.0 2023-09-25 Perl::Critic::UserProfile(3pm)