line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::MigrateToTest2V0::Rule::ReplaceIsDeeplyToIs; |
2
|
1
|
|
|
1
|
|
1030
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
3
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
4
|
1
|
|
|
1
|
|
5
|
use parent 'App::MigrateToTest2V0::Rule'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub apply { |
7
|
0
|
|
|
0
|
0
|
|
my ($class, $doc) = @_; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my $tokens = $doc->find(sub { |
10
|
0
|
|
|
0
|
|
|
my (undef, $elem) = @_; |
11
|
0
|
|
0
|
|
|
|
return $elem->isa('PPI::Token') && $elem->content eq 'is_deeply'; |
12
|
0
|
|
|
|
|
|
}); |
13
|
0
|
0
|
|
|
|
|
return unless $tokens; |
14
|
|
|
|
|
|
|
|
15
|
0
|
|
|
|
|
|
for my $token (@$tokens) { |
16
|
0
|
|
|
|
|
|
$token->set_content('is'); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |