File Coverage

blib/lib/Syntax/Feature/In.pm
Criterion Covered Total %
statement 25 25 100.0
branch n/a
condition n/a
subroutine 9 9 100.0
pod 0 1 0.0
total 34 35 97.1


line stmt bran cond sub pod time code
1             package Syntax::Feature::In;
2 1     1   59353 use strict;
  1         3  
  1         47  
3 1     1   5 use warnings;
  1         2  
  1         41  
4 1     1   589 use match::simple qw(match);
  1         7018  
  1         13  
5 1     1   967 use Sub::Infix;
  1         1313  
  1         85  
6 1     1   8 use Exporter qw(import);
  1         2  
  1         60  
7             our @EXPORT = qw(in);
8 1     1   830 use Data::Dump;
  1         6890  
  1         114  
9              
10             our $VERSION = '0.0001'; # VERSION
11              
12             sub install {
13 1     1 0 11 my ($class, %args) = @_;
14 1     1   9 no strict 'refs';
  1         2  
  1         74  
15 1     4   9 *{$args{into} . '::in'} = infix { match @_ };
  1         14  
  4         238  
16             }
17              
18             # ABSTRACT: provides an "in" operator as a replacement for smartmatch
19              
20              
21             1;
22              
23             __END__