line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pgtools::Fingerprint; |
2
|
1
|
|
|
1
|
|
34718
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
21
|
|
3
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
22
|
|
4
|
1
|
|
|
1
|
|
336
|
use parent qw(Class::Accessor); |
|
1
|
|
|
|
|
217
|
|
|
1
|
|
|
|
|
4
|
|
5
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw(file query)); |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
2241
|
use File::Spec; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
211
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub exec { |
10
|
0
|
|
|
0
|
0
|
0
|
my ($self, $query, $filename) = @_; |
11
|
|
|
|
|
|
|
|
12
|
0
|
0
|
|
|
|
0
|
if($query ne "") { |
13
|
0
|
|
|
|
|
0
|
$query = &symbolize_query($self, $query); |
14
|
0
|
|
|
|
|
0
|
&print_queries($self, $query); |
15
|
0
|
|
|
|
|
0
|
return; |
16
|
|
|
|
|
|
|
} |
17
|
0
|
|
|
|
|
0
|
$filename = File::Spec->rel2abs($filename); |
18
|
|
|
|
|
|
|
|
19
|
0
|
0
|
|
|
|
0
|
open(my $in, '<', $filename) or die "$!"; |
20
|
0
|
|
|
|
|
0
|
while(<$in>) { |
21
|
0
|
|
|
|
|
0
|
chomp $_; |
22
|
0
|
|
|
|
|
0
|
$_ = &symbolize_query($self, $_); |
23
|
0
|
|
|
|
|
0
|
&print_queries($self, $_); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub symbolize_query { |
28
|
8
|
|
|
8
|
0
|
1694
|
my ($self, $q) = @_; |
29
|
8
|
|
|
|
|
59
|
$q =~ s/([\s<>=])([-\+])?[.0123456789]+/$1?/g; |
30
|
8
|
|
|
|
|
34
|
$q =~ s/(true|false)/?/ig; |
31
|
|
|
|
|
|
|
|
32
|
8
|
|
|
|
|
26
|
return $q; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub print_queries { |
36
|
0
|
|
|
0
|
0
|
|
my ($self, $query) = @_; |
37
|
0
|
|
|
|
|
|
print $query."\n"; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|