line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Syntax::Feature::In; |
2
|
1
|
|
|
1
|
|
51965
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
44
|
|
3
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
58
|
|
4
|
1
|
|
|
1
|
|
528
|
use match::simple qw(match); |
|
1
|
|
|
|
|
6949
|
|
|
1
|
|
|
|
|
8
|
|
5
|
1
|
|
|
1
|
|
790
|
use Sub::Infix; |
|
1
|
|
|
|
|
835
|
|
|
1
|
|
|
|
|
50
|
|
6
|
1
|
|
|
1
|
|
5
|
use Exporter qw(import); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
127
|
|
7
|
|
|
|
|
|
|
our @EXPORT = qw(in); |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.0003'; # VERSION |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub install { |
12
|
1
|
|
|
1
|
0
|
15
|
my ($class, %args) = @_; |
13
|
1
|
|
|
1
|
|
7
|
no strict 'refs'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
109
|
|
14
|
1
|
|
|
4
|
|
10
|
*{$args{into} . '::in'} = infix { match @_ }; |
|
1
|
|
|
|
|
19
|
|
|
4
|
|
|
|
|
265
|
|
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# ABSTRACT: provides an "in" operator as a replacement for smartmatch |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
__END__ |