blib/lib/re/engine/RE2.pm

filter: Statementstmt 100% 7 / 7 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 11 / 11 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« re2_xs.cc ↑ Summary
1 package re::engine::RE2;
2 20 ▶use 5.020;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 20 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
5 20 $re::engine::RE2::VERSION = "0.18";
6 }
7  
8 20 ▶use XSLoader ();
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 # All engines should subclass the core Regexp package
11 our @ISA = 'Regexp';
12  
13 BEGIN
14 20 ▶{
Subroutine BEGIN: called CC=1 SCAR=0.0
15 20 XSLoader::load __PACKAGE__, $re::engine::RE2::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__
« re2_xs.cc ↑ Summary