line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Chai::Util::Equal; |
2
|
4
|
|
|
4
|
|
148727
|
use strict; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
116
|
|
3
|
4
|
|
|
4
|
|
21
|
use warnings; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
105
|
|
4
|
4
|
|
|
4
|
|
20
|
use utf8; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
27
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
111
|
use Exporter qw/import/; |
|
4
|
|
|
|
|
44
|
|
|
4
|
|
|
|
|
239
|
|
7
|
|
|
|
|
|
|
our @EXPORT_OK = qw/equal eql/; |
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
3066
|
use Test::Deep::NoTest qw/eq_deeply/; |
|
4
|
|
|
|
|
639
|
|
|
4
|
|
|
|
|
17
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub equal { |
12
|
42
|
|
|
42
|
0
|
793
|
my ($lhs, $rhs) = @_; |
13
|
|
|
|
|
|
|
|
14
|
42
|
|
100
|
|
|
314
|
my $equals = defined $lhs && defined $rhs && $lhs eq $rhs; |
15
|
42
|
|
100
|
|
|
127
|
my $equals_undef = !defined $lhs && !defined $rhs; # undef == undef |
16
|
|
|
|
|
|
|
|
17
|
42
|
|
100
|
|
|
264
|
return $equals || $equals_undef; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub eql { |
21
|
26
|
|
|
26
|
0
|
986
|
return eq_deeply(@_); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |