line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/bin/perl |
2
|
30
|
|
|
30
|
|
16202
|
use strict; |
|
30
|
|
|
|
|
67
|
|
|
30
|
|
|
|
|
885
|
|
3
|
30
|
|
|
30
|
|
125
|
use warnings; |
|
30
|
|
|
|
|
48
|
|
|
30
|
|
|
|
|
1115
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Operator::Equals; |
6
|
30
|
|
|
30
|
|
133
|
use base 'WWW::Shopify::Liquid::Operator'; |
|
30
|
|
|
|
|
37
|
|
|
30
|
|
|
|
|
2230
|
|
7
|
30
|
|
|
30
|
|
157
|
use Scalar::Util qw(looks_like_number); |
|
30
|
|
|
|
|
50
|
|
|
30
|
|
|
|
|
3172
|
|
8
|
0
|
|
|
0
|
0
|
|
sub symbol { return ('==', 'is'); } |
9
|
0
|
|
|
0
|
0
|
|
sub priority { return 5; } |
10
|
30
|
|
|
30
|
|
16216
|
use Data::Compare; |
|
30
|
|
|
|
|
307305
|
|
|
30
|
|
|
|
|
214
|
|
11
|
|
|
|
|
|
|
sub operate { |
12
|
0
|
|
|
0
|
0
|
|
my ($self, $hash, $action, $op1, $op2) = @_; |
13
|
0
|
0
|
0
|
|
|
|
return 1 if !defined $op1 && !defined $op2; |
14
|
0
|
0
|
0
|
|
|
|
return 0 if defined $op1 xor defined $op2; |
15
|
0
|
0
|
0
|
|
|
|
return $op1 == $op2 if (ref($op1) && ref($op2) && ref($op1) eq "DateTime" && ref($op2) eq "DateTime"); |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
16
|
0
|
0
|
0
|
|
|
|
return Compare($op1, $op2) if (ref($op1) && ref($op2)); |
17
|
0
|
0
|
0
|
|
|
|
return $op1 == $op2 if looks_like_number($op1) && looks_like_number($op2); |
18
|
0
|
|
|
|
|
|
return ($op1 cmp $op2) == 0; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |