|
Lines 141-146
sub tidy_perl {
Link Here
|
| 141 |
: sprintf q{perltidy --backup-and-modify-in-place --nostandard-output -pro=%s %s}, $perltidyrc, $file; |
141 |
: sprintf q{perltidy --backup-and-modify-in-place --nostandard-output -pro=%s %s}, $perltidyrc, $file; |
| 142 |
|
142 |
|
| 143 |
print qx{$cmd}; |
143 |
print qx{$cmd}; |
|
|
144 |
|
| 145 |
# Run podtidy on the same file |
| 146 |
my $pod_cmd = |
| 147 |
$no_write |
| 148 |
? sprintf q{podtidy --config=.podtidyrc --stdout %s}, $file |
| 149 |
: sprintf q{podtidy --config=.podtidyrc --backup-and-modify-in-place %s}, $file; |
| 150 |
|
| 151 |
print qx{$pod_cmd}; |
| 144 |
} |
152 |
} |
| 145 |
|
153 |
|
| 146 |
sub tidy_js { |
154 |
sub tidy_js { |
|
Lines 197-203
sub l {
Link Here
|
| 197 |
|
205 |
|
| 198 |
=head1 NAME |
206 |
=head1 NAME |
| 199 |
|
207 |
|
| 200 |
tidy.pl - Tidy Perl, Javascript, Vue and Template::Toolkit files. |
208 |
tidy.pl - Tidy Perl (including POD), Javascript, Vue and Template::Toolkit files. |
| 201 |
|
209 |
|
| 202 |
=head1 SYNOPSIS |
210 |
=head1 SYNOPSIS |
| 203 |
|
211 |
|
|
Lines 216-221
tidy.pl [options] [files]
Link Here
|
| 216 |
=head1 DESCRIPTION |
224 |
=head1 DESCRIPTION |
| 217 |
|
225 |
|
| 218 |
This script will tidy the different files present in the git repository. |
226 |
This script will tidy the different files present in the git repository. |
|
|
227 |
For Perl files, it runs both perltidy (for code formatting) and podtidy (for POD documentation formatting). |
| 219 |
|
228 |
|
| 220 |
If the file is an exception and should be tidy, it will be skipped. |
229 |
If the file is an exception and should be tidy, it will be skipped. |
| 221 |
However if only one file is passed with --no-write then the content of the file will be print to STDOUT. |
230 |
However if only one file is passed with --no-write then the content of the file will be print to STDOUT. |