Perl::...rdTabs(3pm)
π NAME π
okay so this is the Perl::...rdTabs(3pm) page from User Contributed Perl Documentation, and the policy is Perl::Critic::Policy::CodeLayout::ProhibitHardTabs β bestie, the whole point is: use spaces instead of tabs. π
πΈ AFFILIATION πΈ
slay, this Policy is part of the core Perl::Critic distribution. π
β¨ DESCRIPTION β¨
Putting hard tabs in your source code (or POD) is lowkey one of the worst things you can do to your co-workers and colleagues β especially if those tabs are anywhere other than a leading position. π Because various applications and devices represent tabs differently, they can cause your code to look vastly different to other people. Any decent editor can be configured to expand tabs into spaces. Perl::Tidy also does this for you. π«Ά
This Policy catches all tabs in your source code, including POD, quotes, and HEREDOCs. The contents of the __DATA__ section are not examined. π
π CONFIGURATION π
Hard tabs in a string are always forbidden (use "\t" instead). But hard tabs in a leading position are allowed when they are used to indent code statements, qw() word lists, and regular expressions with the "/x" modifier. However, if you want to forbid all tabs everywhere, then add this to your .perlcriticrc file:
[CodeLayout::ProhibitHardTabs]
allow_leading_tabs = 0
π¦ NOTES π¦
beware, bestie: Perl::Critic may report the location of the string that contains the tab, not the actual location of the tab, so you may need to do some hunting. π
the author says they'll try and fix this in the future π«Ά
π AUTHOR π
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> β iconic. π
π 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.
mwah π β this was Perl::...rdTabs(3pm) from User Contributed Perl Documentation, perl v5.42.0, dated 2024-10-23. bye bestie π
π¦ 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