3

Is it possible to "add" another profile to perlcritic default profile, or run perlcritic with multiple profiles? I do not want to skip/replace the default profile. I need to add an additional profile to it.

I know I could export current profile and append my additions, then use that as the default profile. But in that case I should make sure I'll do the same thing after each perlcritic update since the default profile might have been updated.

Community
  • 1
  • 1
farzad
  • 8,775
  • 6
  • 32
  • 41
  • Can you clarify your meaning a bit? Are you saying that you have an existing `.perlcriticrc` file that the team/project uses (i.e. your "default") and you would like to override that with an additional (say, user-specific) profile? – Jeffrey Ryan Thalhammer Oct 18 '13 at 08:19

1 Answers1

0

Your .perlcriticrc modifies the default profile, rather than replacing it. There's the --only command-line option, to tell it to only use the policies listed in your .perlcriticrc, and skip the default profile. You can also specify this within your .perlcriticrc, by putting only = 1 above the first named section of the file. If you don't specify --only on the command line, or only = 1 in your .perltidyrc, your .perltidyrc will modify the default profile, rather than throw it out and replace it.

See the perlcritic POD for more details.