File Coverage

blib/lib/Syntax/Feature/In.pm
Criterion Covered Total %
statement 22 22 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod 0 1 0.0
total 30 31 96.7


line stmt bran cond sub pod time code
1             package Syntax::Feature::In;
2 1     1   36824 use strict;
  1         2  
  1         29  
3 1     1   4 use warnings;
  1         1  
  1         24  
4 1     1   463 use match::simple qw(match);
  1         4741  
  1         8  
5 1     1   588 use Sub::Infix;
  1         785  
  1         45  
6 1     1   5 use Exporter qw(import);
  1         2  
  1         53  
7             our @EXPORT = qw(in);
8              
9             our $VERSION = '0.0002'; # VERSION
10              
11             sub install {
12 1     1 0 165 my ($class, %args) = @_;
13 1     1   4 no strict 'refs';
  1         2  
  1         60  
14 1     4   11 *{$args{into} . '::in'} = infix { match @_ };
  1         19  
  4         237  
15             }
16              
17             # ABSTRACT: provides an "in" operator as a replacement for smartmatch
18              
19              
20             1;
21              
22             __END__