line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Regexp::Extended::MatchGroup; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
13
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
68
|
|
4
|
2
|
|
|
2
|
|
10
|
use Carp; |
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
119
|
|
5
|
2
|
|
|
2
|
|
1223
|
use Regexp::Extended::MatchArray; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
91
|
|
6
|
2
|
|
|
2
|
|
21
|
use overload '%{}' => \&gethash, '@{}' => \&getarray; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
21
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
0
|
|
|
0
|
0
|
|
my ($this, $parent, $name) = @_; |
10
|
0
|
|
0
|
|
|
|
my $class = ref($this) || $this; |
11
|
0
|
|
|
|
|
|
my $data = { |
12
|
|
|
|
|
|
|
'parent' => $parent, |
13
|
|
|
|
|
|
|
'name' => $name, |
14
|
|
|
|
|
|
|
'matches' => [], |
15
|
|
|
|
|
|
|
'subMatches' => {}, |
16
|
|
|
|
|
|
|
}; |
17
|
0
|
|
|
|
|
|
my $self = \$data; |
18
|
0
|
|
|
|
|
|
bless $self, $class; |
19
|
0
|
|
|
|
|
|
return $self; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub gethash { |
23
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
24
|
0
|
|
|
|
|
|
my %h; |
25
|
0
|
|
|
|
|
|
tie %h, ref $self, $self; |
26
|
0
|
|
|
|
|
|
\%h; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub getarray { |
30
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
31
|
0
|
|
|
|
|
|
my @h; |
32
|
0
|
|
|
|
|
|
tie @h, ref $self, $self; |
33
|
0
|
|
|
|
|
|
\@h; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
0
|
|
|
sub TIEARRAY { my $p = shift; bless \ shift, "Regexp::Extended::MatchArray" } |
|
0
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
return 1; |