| 1 | 4 | ▶ | use strictures; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | package Perl::Tidy::Komodo; | ||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | 4 | our $VERSION = '1.151340'; # VERSION | |||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | # ABSTRACT: tidy perl files in Komodo with a project rc | ||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | # | ||||||||||||||||||||||||||||
| 10 | # This file is part of Perl-Tidy-Komodo | ||||||||||||||||||||||||||||
| 11 | # | ||||||||||||||||||||||||||||
| 12 | # | ||||||||||||||||||||||||||||
| 13 | # Christian Walde has dedicated the work to the Commons by waiving all of his | ||||||||||||||||||||||||||||
| 14 | # or her rights to the work worldwide under copyright law and all related or | ||||||||||||||||||||||||||||
| 15 | # neighboring legal rights he or she had in the work, to the extent allowable by | ||||||||||||||||||||||||||||
| 16 | # law. | ||||||||||||||||||||||||||||
| 17 | # | ||||||||||||||||||||||||||||
| 18 | # Works under CC0 do not require attribution. When citing the work, you should | ||||||||||||||||||||||||||||
| 19 | # not imply endorsement by the author. | ||||||||||||||||||||||||||||
| 20 | # | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 4 | ▶ | use Perl::Tidy; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 23 | 4 | ▶ | use File::chdir; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | 2 | ▶ | sub run { | ||||||||||||||||||||||||||
|
Subroutine
run: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 27 | 2 | _try_set_perltidy_env(); | |||||||||||||||||||||||||||
| 28 | 2 | Perl::Tidy::perltidy(); | |||||||||||||||||||||||||||
| 29 | } | ||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | 2 | ▶ | sub _try_set_perltidy_env { | ||||||||||||||||||||||||||
|
Subroutine
_try_set_perltidy_env: called CC=5 SCAR=16.1
| |||||||||||||||||||||||||||||
| 32 | 2 | ▶ | return if exists $ENV{PERLTIDY}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 33 | 2 | my @cwd_store = @CWD; | |||||||||||||||||||||||||||
| 34 | 2 | ▶ | while ( $CWD[0] ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 35 | 11 | ▶ | if ( -d 'lib' and -f '.perltidyrc' ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
-d "lib" and -f ".perltidyrc"
MC/DC100%2/2
-d "lib" and -f ".perltidyrc"
-d "lib"
-f ".perltidyrc"
Truth table100%3/3
A and B
A= -d "lib"B= -f ".perltidyrc"
| |||||||||||||||||||||||||||||
| 36 | 1 | $ENV{PERLTIDY} = $CWD; | |||||||||||||||||||||||||||
| 37 | 1 | last; | |||||||||||||||||||||||||||
| 38 | } | ||||||||||||||||||||||||||||
| 39 | 10 | pop @CWD; | |||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||
| 41 | 2 | @CWD = @cwd_store; | |||||||||||||||||||||||||||
| 42 | 2 | return; | |||||||||||||||||||||||||||
| 43 | } | ||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | 4 | 1; | |||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | __END__ | ||||||||||||||||||||||||||||