File Coverage

blib/lib/App/MigrateToTest2V0/Rule/ReplaceIsDeeplyToIs.pm
Criterion Covered Total %
statement 16 16 100.0
branch 2 2 100.0
condition 3 3 100.0
subroutine 5 5 100.0
pod 0 1 0.0
total 26 27 96.3


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