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.015';
3             # ABSTRACT: Perl-ish syntax for querying data structures
4              
5 3     3   179790 use strict;
  3         11  
  3         72  
6 3     3   13 use warnings;
  3         4  
  3         69  
7              
8 3     3   1116 use Devel::Optic::Lens::Perlish::Parser qw(parse);
  3         7  
  3         142  
9 3     3   1132 use Devel::Optic::Lens::Perlish::Interpreter qw(run);
  3         7  
  3         359  
10              
11             our @CARP_NOT = qw(Devel::Optic);
12             sub new {
13 14     14 0 16582 my ($class) = @_;
14 14         21 my $self = {};
15 14         49 bless $self, $class;
16             }
17              
18             sub inspect {
19 58     58 0 7725 my ($self, $scope, $query) = @_;
20 58         128 my $ast = parse($query);
21 55         132 return run($scope, $ast);
22             }
23              
24             1;
25              
26             __END__