line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::MigrateToTest2V0::CLI; |
2
|
3
|
|
|
3
|
|
105803
|
use strict; |
|
3
|
|
|
|
|
22
|
|
|
3
|
|
|
|
|
89
|
|
3
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
76
|
|
4
|
3
|
|
|
3
|
|
802
|
use App::MigrateToTest2V0; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
101
|
|
5
|
3
|
|
|
3
|
|
17
|
use Carp qw(croak); |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
193
|
|
6
|
3
|
|
|
3
|
|
1896
|
use PPI; |
|
3
|
|
|
|
|
356440
|
|
|
3
|
|
|
|
|
416
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub process { |
9
|
2
|
|
|
2
|
0
|
2252
|
my ($class, @argv) = @_; |
10
|
|
|
|
|
|
|
|
11
|
2
|
|
|
|
|
8
|
for my $filename (@argv) { |
12
|
2
|
50
|
|
|
|
37
|
croak "$filename not found" unless -e $filename; |
13
|
|
|
|
|
|
|
|
14
|
2
|
|
|
|
|
35
|
my $doc = PPI::Document->new($filename); |
15
|
2
|
|
|
|
|
25526
|
my $migrated_doc = App::MigrateToTest2V0->apply($doc); |
16
|
2
|
|
|
|
|
17
|
$migrated_doc->save($migrated_doc->filename); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |