The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Perl::Critic::Policy::CodeLayout::RequireTidyCode

DESCRIPTION

Conway does make specific recommendations for whitespace and curly-braces in your code, but the most important thing is to adopt a consistent layout, regardless of the specifics. And the easiest way to do that is to use Perl::Tidy. This policy will complain if you're code hasn't been run through Perl::Tidy.

CONSTRUCTOR

This Policy accepts an additional key-value pair in the constructor. The key must be perltidyrc and the value is the filename of a Perl::Tidy configuration file. The default is undef, which tells Perl::Tidy to look in it's default location. Users of Perl::Critic can configure this in their .perlcriticrc file like this:

  [CodeLayout::RequireTidyCode]
  perltidyrc = /usr/share/perltidy.conf

As a special case, setting perltidyrc to the empty string tells Perl::Tidy not to load any configuration file at all and just use Perl::Tidy's own default style.

  [CodeLayout::RequireTidyCode]
  perltidyrc = 

NOTES

Perl::Tidy is not included in the Perl::Critic distribution. The latest version of Perl::Tidy can be downloaded from CPAN. If Perl::Tidy is not installed, this policy is silently ignored.

SEE ALSO

Perl::Tidy

AUTHOR

Jeffrey Ryan Thalhammer <thaljef@cpan.org>

COPYRIGHT

Copyright (c) 2005-2006 Jeffrey Ryan Thalhammer. All rights reserved.

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.