.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Test::Tabs 3pm" .TH Test::Tabs 3pm "2021-01-07" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Test::Tabs \- check the presence of tabs in your project .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& use Test::Tabs tests => 1; \& tabs_ok(\*(Aqlib/Module.pm\*(Aq, \*(AqModule is indented sanely\*(Aq); .Ve .PP Or .PP .Vb 2 \& use Test::Tabs; \& all_perl_files_ok(); .Ve .PP Or .PP .Vb 2 \& use Test::Tabs; \& all_perl_files_ok( @mydirs ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module scans your project/distribution for any perl files (scripts, modules, etc) for the presence of tabs. .PP In particular, it checks that all indentation is done using tabs, not spaces; alignment is done via spaces, not tabs; indentation levels never jump up (e.g. going from 1 tab indent to 3 tab indent without an intervening 2 tab indent); and there is no trailing whitespace on any line (though lines may consist entirely of whitespace). .PP Comment lines and pod are ignored. (A future version may also ignore heredocs.) .PP A trailing comment \f(CW\*(C`##WS\*(C'\fR can be used to ignore all whitespace rules for that line. \f(CW\*(C`## no Test::Tabs\*(C'\fR can be used to begin ignoring whitespace rules for all following lines until \f(CW\*(C`## use Test::Tabs\*(C'\fR is seen. \f(CW\*(C`## skip Test::Tabs\*(C'\fR tells Test::Tabs to skip the current file, but it must be used \fIbefore\fR the first whitespace rule violation. .SS "Functions" .IX Subsection "Functions" .ie n .IP """all_perl_files_ok( @directories )""" 4 .el .IP "\f(CWall_perl_files_ok( @directories )\fR" 4 .IX Item "all_perl_files_ok( @directories )" Applies \f(CW\*(C`tabs_ok()\*(C'\fR to all perl files found in \f(CW@directories\fR recursively. If no \f(CW@directories\fR are given, the starting point is one level above the current running script, that should cover all the files of a typical \s-1CPAN\s0 distribution. A perl file is *.pl, *.pm, *.psgi, *.t, or a file starting with \f(CW\*(C`#!...perl\*(C'\fR. .ie n .IP """tabs_ok( $file, $text )""" 4 .el .IP "\f(CWtabs_ok( $file, $text )\fR" 4 .IX Item "tabs_ok( $file, $text )" Run a tab check on \f(CW$file\fR. For a module, either the path (\f(CW\*(C`lib/My/Module.pm\*(C'\fR) or the package name (\f(CW\*(C`My::Module\*(C'\fR) can be used. .Sp \&\f(CW$text\fR is the optional test name. .SH "BUGS" .IX Header "BUGS" Please report any bugs to . .SH "SEE ALSO" .IX Header "SEE ALSO" Test::EOL, Test::More. .SH "AUTHOR" .IX Header "AUTHOR" Toby Inkster . .PP Large portions stolen from Test::NoTabs by Nick Gerakines. .SH "COPYRIGHT AND LICENCE" .IX Header "COPYRIGHT AND LICENCE" This software is copyright (c) 2012\-2013 by Toby Inkster. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. .SH "DISCLAIMER OF WARRANTIES" .IX Header "DISCLAIMER OF WARRANTIES" \&\s-1THIS PACKAGE IS PROVIDED \*(L"AS IS\*(R" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.\s0