Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

perl::critic::policy::codelayout::prohibithardtabs(3pm) [debian man page]

Perl::Critic::Policy::CodeLayout::ProhibitHardTabs(3pm) User Contributed Perl DocumentationPerl::Critic::Policy::CodeLayout::ProhibitHardTabs(3pm)

NAME
Perl::Critic::Policy::CodeLayout::ProhibitHardTabs - Use spaces instead of tabs. AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Putting hard tabs in your source code (or POD) is 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 you 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 " " 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 that 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. I'll try and fix this in the future. AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> COPYRIGHT
Copyright (c) 2005-2011 Imaginative Software Systems. 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. perl v5.14.2 2012-06-07 Perl::Critic::Policy::CodeLayout::ProhibitHardTabs(3pm)

Check Out this Related Man Page

Perl::Critic::Policy::CodeLayout::RequireTrailingCommas(User Contributed Perl DocumentPerl::Critic::Policy::CodeLayout::RequireTrailingCommas(3pm)

NAME
Perl::Critic::Policy::CodeLayout::RequireTrailingCommas - Put a comma at the end of every multi-line list declaration, including the last one. AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Conway suggests that all elements in a multi-line list should be separated by commas, including the last element. This makes it a little easier to re-order the list by cutting and pasting. my @list = ($foo, $bar, $baz); #not ok my @list = ($foo, $bar, $baz,); #ok CONFIGURATION
This Policy is not configurable except for the standard options. NOTES
In the PPI parlance, a "list" is almost anything with parentheses. I've tried to make this Policy smart by targeting only "lists" that have at least one element and are being assigned to something. However, there may be some edge cases that I haven't covered. If you find one, send me a note. AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> COPYRIGHT
Copyright (c) 2005-2011 Imaginative Software Systems. 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. perl v5.14.2 2012-06-07 Perl::Critic::Policy::CodeLayout::RequireTrailingCommas(3pm)
Man Page

11 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copy code to vi

Hi, whenever I copy a code to vi session from other script it just goes weird. It just goes across the whole screen and looks really bizzare If the code is small I can manually remove the tabs and indent it correctly but if it is 2000 lines it makes it really difficult. Is there something... (12 Replies)
Discussion started by: rooh
12 Replies

2. Shell Programming and Scripting

counting tabs and/or whitespace

hey all, does anybody know a good way to count the number of tabs before a word in a line? Or maybe even whitespace, although tabs seem to be what is seperating the word from the beginning of the line? I have a specific file format I am parsing and trying to find child parent relationships. ... (2 Replies)
Discussion started by: nix21
2 Replies

3. Shell Programming and Scripting

how to align report headers in awk

Is it any way exept playing with spaces (tabs don't help) (3 Replies)
Discussion started by: galinaqt
3 Replies

4. Shell Programming and Scripting

can v add 'n' of spaces by a single command?

Hi All, I just need to check for 'tabs' in my input file and need to replace all tabs into 'n' no. of spaces. Say for example if I give NO_OF_SPACE=5, then it should replace all tabs with 5 spaces abc.in ##### asdasdasd \t\t\tasjkalskdl;asdsdjfksldfjklsdfxcmxm,cv... (2 Replies)
Discussion started by: askumarece
2 Replies

5. Programming

Vi question for writing source code

Hi guys, I'm modifying an old f77 code using vi. I'm modifying the code remotely from my windows machine using xming using vi. I'm using tabs to move past the first 6 columns of the code and to keep my loops and if statements neat, but when I hit the tab key, vi displays a big red block which is... (7 Replies)
Discussion started by: rks171
7 Replies

6. Shell Programming and Scripting

replace spaces/tabs with delimiter |

Hi, I'm looking for a command that replaces spaces/tabs with pipe symbol and store the result to the same file instead of routing it to another file. infile outfile Thanks. (11 Replies)
Discussion started by: dvah
11 Replies

7. Shell Programming and Scripting

Help understanding Perl code.

Well, I found myself trying to fix some Perl code (Ive never done any Perl in my life) and I pinpointed the place where the bug could be. But to be sure I have to know what does a few line of code mean: $files_lim =~ (/^\d*$/) $files_lim =~ (/^\d*h$/)$files_age =~ s/h//The code where this was... (0 Replies)
Discussion started by: RedSpyder
0 Replies

8. Shell Programming and Scripting

Help understanding some Perl code.

Well, I found myself trying to fix some Perl code (Ive never done any Perl in my life) and I pinpointed the place where the bug could be. But to be sure I have to know what does a few line of code mean: $files_lim =~ (/^\d*$/) $files_lim =~ (/^\d*h$/) $files_age =~ s/h// The code where... (2 Replies)
Discussion started by: RedSpyder
2 Replies

9. Shell Programming and Scripting

How to fix my code in Perl?

Hi Perl users, Could you help me how to fix my code so I can get the expected output as seen below? is there missing in my program? Thank You #!/usr/bin/perl -w use strict; open (FH, "< file1.log") or die $!; open (FL, "< file2.log") or die $!; my $file = "result.log"; my... (1 Reply)
Discussion started by: askari
1 Replies

10. UNIX for Advanced & Expert Users

Vimrc creating tabs instead of spaces

I'm having trouble getting my vimrc to work the way I want it. For some reason after I hit enter it is creating tabs instead of spaces like I would expect. Here is an example of what I am talking about. $ = newline, ^I = tab. On the line of struct EDGETAG* q; I hit enter and it created a tab... (2 Replies)
Discussion started by: cokedude
2 Replies

11. UNIX for Beginners Questions & Answers

How to check string contain multiple tabs or spaces?

str contains tabs and multiple spaces str="hello world. How are you?" I want to check string start with hello world, and my code is: if ]world"* ]]; then echo "found" else echo "not found" fi Not work Other solution may work is to replace all tabs and... (4 Replies)
Discussion started by: cmdcmd
4 Replies