line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package re::engine::RE2; |
2
|
20
|
|
|
20
|
|
336426
|
use 5.010; |
|
20
|
|
|
|
|
66
|
|
|
20
|
|
|
|
|
855
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
BEGIN { |
5
|
20
|
|
|
20
|
|
366
|
$re::engine::RE2::VERSION = "0.12"; |
6
|
|
|
|
|
|
|
} |
7
|
|
|
|
|
|
|
|
8
|
20
|
|
|
20
|
|
105
|
use XSLoader (); |
|
20
|
|
|
|
|
29
|
|
|
20
|
|
|
|
|
843
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# All engines should subclass the core Regexp package |
11
|
|
|
|
|
|
|
our @ISA = 'Regexp'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
BEGIN |
14
|
|
|
|
|
|
|
{ |
15
|
20
|
|
|
20
|
|
31030
|
XSLoader::load __PACKAGE__, $VERSION; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub import |
19
|
|
|
|
|
|
|
{ |
20
|
|
|
|
|
|
|
my $class = shift; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
$^H{regcomp} = ENGINE; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
if (@_) { |
25
|
|
|
|
|
|
|
my %args = @_; |
26
|
|
|
|
|
|
|
if (exists $args{"-max_mem"}) { |
27
|
|
|
|
|
|
|
$^H{__PACKAGE__ . "::max-mem"} = $args{"-max_mem"}; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
if (exists $args{"-strict"}) { |
31
|
|
|
|
|
|
|
$^H{__PACKAGE__ . "::strict"} = $args{"-strict"}; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
if (exists $args{"-longest_match"}) { |
35
|
|
|
|
|
|
|
$^H{__PACKAGE__ . "::longest-match"} = $args{"-longest_match"}; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
if (exists $args{"-never_nl"}) { |
39
|
|
|
|
|
|
|
$^H{__PACKAGE__ . "::never-nl"} = $args{"-never_nl"}; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub unimport |
45
|
|
|
|
|
|
|
{ |
46
|
|
|
|
|
|
|
delete $^H{regcomp} |
47
|
|
|
|
|
|
|
if $^H{regcomp} == ENGINE; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
__END__ |