line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package match::simple::XS; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
146096
|
use 5.012; |
|
3
|
|
|
|
|
34
|
|
4
|
3
|
|
|
3
|
|
15
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
60
|
|
5
|
3
|
|
|
3
|
|
13
|
use warnings; |
|
3
|
|
|
|
|
14
|
|
|
3
|
|
|
|
|
559
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TOBYINK'; |
8
|
|
|
|
|
|
|
our $VERSION = '0.002'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
require mro; |
11
|
|
|
|
|
|
|
require Carp; |
12
|
|
|
|
|
|
|
require XSLoader; |
13
|
|
|
|
|
|
|
XSLoader::load( 'match::simple::XS', $VERSION ); |
14
|
|
|
|
|
|
|
|
15
|
10
|
|
|
10
|
|
8766
|
sub _regexp { scalar( $_[0] =~ $_[1] ) } |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub _overloaded_smartmatch { |
18
|
2
|
|
|
2
|
|
4009
|
my ( $obj ) = @_; |
19
|
|
|
|
|
|
|
|
20
|
2
|
|
|
|
|
5
|
my @mro = @{ mro::get_linear_isa( ref $obj ) }; |
|
2
|
|
|
|
|
13
|
|
21
|
2
|
|
|
|
|
5
|
for my $class ( @mro ) { |
22
|
2
|
|
|
|
|
6
|
my $name = "$class\::(~~"; |
23
|
2
|
|
|
|
|
4
|
my $overload = do { |
24
|
3
|
|
|
3
|
|
22
|
no strict 'refs'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
333
|
|
25
|
2
|
50
|
|
|
|
9
|
exists( &$name ) ? \&$name : undef; |
26
|
|
|
|
|
|
|
}; |
27
|
2
|
50
|
|
|
|
51
|
return $overload if $overload; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
return; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
__END__ |