line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package String::Wildcard::SQL; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
776
|
use 5.010001; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
38
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.01'; # VERSION |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
4
|
use Exporter; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
178
|
|
10
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
11
|
|
|
|
|
|
|
our @EXPORT_OK = qw( |
12
|
|
|
|
|
|
|
contains_wildcard |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my $re1 = |
16
|
|
|
|
|
|
|
qr/ |
17
|
|
|
|
|
|
|
# (?: |
18
|
|
|
|
|
|
|
# # non-empty, non-escaped character class |
19
|
|
|
|
|
|
|
# (?
|
20
|
|
|
|
|
|
|
# (?: \\\\ | \\\[ | \\\] | [^\\\[\]] )+ |
21
|
|
|
|
|
|
|
# (?
|
22
|
|
|
|
|
|
|
# ) |
23
|
|
|
|
|
|
|
#| |
24
|
|
|
|
|
|
|
(?: |
25
|
|
|
|
|
|
|
# non-escaped % and _ |
26
|
|
|
|
|
|
|
(?
|
27
|
|
|
|
|
|
|
) |
28
|
|
|
|
|
|
|
/ox; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub contains_wildcard { |
31
|
8
|
|
|
8
|
1
|
4212
|
my ($str, $variant) = @_; |
32
|
|
|
|
|
|
|
|
33
|
8
|
|
|
|
|
59
|
$str =~ /$re1/go; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
# ABSTRACT: SQL wildcard string routines |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |