The Perl Advent Calendar needs more articles for 2022. Submit your idea today!


Perl::Critic::Policy::CodeLayout::ProhibitSpaceIndentation - Use tabs instead of spaces for indentation.


For projects which have a policy of using tabs for indentation, you want to ensure there are no spaces used for that purpose. This Policy catches all such occurrences so that you can be sure when the tab sizes are reconfigured, spaces won't make indented code look wrong.

This policy can be used together with CodeLayout::ProhibitHardTabs by setting allow_leading_tabs option of the latter to 1.


This Policy is not configurable except for the standard options.


If there are blank lines before a violating line, the first blank line will be reported as the violation location, because all the whitespace forms a single token which Perl::Critic gives to the policy.


Infoxchange Australia <>


Copyright (c) 2012 Infoxchange Australia. 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.