File Coverage

blib/lib/Smart/Match/Overload.pm
Criterion Covered Total %
statement 17 17 100.0
branch 1 2 50.0
condition n/a
subroutine 6 6 100.0
pod 1 1 100.0
total 25 26 96.1


line stmt bran cond sub pod time code
1             package Smart::Match::Overload;
2             {
3             $Smart::Match::Overload::VERSION = '0.007';
4             }
5 1     1   5 use strict;
  1         2  
  1         35  
6 1     1   5 use warnings FATAL => 'all';
  1         2  
  1         42  
7 1     1   5 use XSLoader;
  1         1  
  1         118  
8              
9             XSLoader::load(__PACKAGE__, __PACKAGE__->VERSION);
10              
11             use overload
12             '~~' => sub {
13 174     174   5141 my ($self, undef, $rev) = @_;
14 174 50       350 return if not $rev;
15 174         544 return $self->() for $_[1];
16             },
17 1     1   1756 bool => \&_boolean;
  1         1048  
  1         11  
18              
19             sub new {
20 127     127 1 192 my ($class, $sub) = @_;
21 127         3420 return bless $sub, $class;
22             }
23              
24             1;
25              
26             # A class for closure based matcher objects.
27              
28             __END__