File Coverage

blib/lib/Devel/Optic/Lens/Perlish.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 0 2 0.0
total 24 26 92.3


line stmt bran cond sub pod time code
1             package Devel::Optic::Lens::Perlish;
2             $Devel::Optic::Lens::Perlish::VERSION = '0.013';
3             # ABSTRACT: Perl-ish syntax for querying data structures
4              
5 3     3   182100 use strict;
  3         10  
  3         71  
6 3     3   12 use warnings;
  3         5  
  3         70  
7              
8 3     3   1138 use Devel::Optic::Lens::Perlish::Parser qw(parse);
  3         6  
  3         150  
9 3     3   1131 use Devel::Optic::Lens::Perlish::Interpreter qw(run);
  3         7  
  3         401  
10              
11             our @CARP_NOT = qw(Devel::Optic);
12             sub new {
13 13     13 0 16884 my ($class) = @_;
14 13         19 my $self = {};
15 13         43 bless $self, $class;
16             }
17              
18             sub inspect {
19 58     58 0 7953 my ($self, $scope, $query) = @_;
20 58         141 my $ast = parse($query);
21 55         128 return run($scope, $ast);
22             }
23              
24             1;
25              
26             __END__