line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Devel::Optic::Lens::Perlish; |
2
|
|
|
|
|
|
|
$Devel::Optic::Lens::Perlish::VERSION = '0.014'; |
3
|
|
|
|
|
|
|
# ABSTRACT: Perl-ish syntax for querying data structures |
4
|
|
|
|
|
|
|
|
5
|
3
|
|
|
3
|
|
181924
|
use strict; |
|
3
|
|
|
|
|
11
|
|
|
3
|
|
|
|
|
71
|
|
6
|
3
|
|
|
3
|
|
12
|
use warnings; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
70
|
|
7
|
|
|
|
|
|
|
|
8
|
3
|
|
|
3
|
|
1162
|
use Devel::Optic::Lens::Perlish::Parser qw(parse); |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
148
|
|
9
|
3
|
|
|
3
|
|
1133
|
use Devel::Optic::Lens::Perlish::Interpreter qw(run); |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
358
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @CARP_NOT = qw(Devel::Optic); |
12
|
|
|
|
|
|
|
sub new { |
13
|
13
|
|
|
13
|
0
|
17054
|
my ($class) = @_; |
14
|
13
|
|
|
|
|
23
|
my $self = {}; |
15
|
13
|
|
|
|
|
45
|
bless $self, $class; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub inspect { |
19
|
58
|
|
|
58
|
0
|
7908
|
my ($self, $scope, $query) = @_; |
20
|
58
|
|
|
|
|
133
|
my $ast = parse($query); |
21
|
55
|
|
|
|
|
149
|
return run($scope, $ast); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |