Expr/Bound.pm

filter: Statementstmt 75.0% 15 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 3 totaltotal 64.2% 18 / 28 CC 1 SCAR 3.4
CC
1
Cov
75%
deparse
2.0
stringify
2.0
BEGIN
1.0
CRAP 1.4
« Expr/Placeholder.pm ↑ Summary Expr/Method.pm »
1 package Acme::Lambda::Expr::Bound;
2  
3 4 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 extends qw(Acme::Lambda::Expr::Proc);
5  
6 4 has function => (
7 is => 'ro',
8 isa => 'Acme::Lambda::Expr::Term',
9  
10 required => 1,
11 );
12  
13 0 ▶sub deparse{
Subroutine deparse: not called CC=1 SCAR=6.9
Pod undocumented
14 0 my($self) = @_;
15 return sprintf 'sub{ %s }->(%s)',
16 $self->function->deparse,
17 0 join q{, }, map{ $_->deparse } $self->args;
18 }
19 0 ▶sub stringify{
Subroutine stringify: not called CC=1 SCAR=6.9
Pod undocumented
20 0 my($self) = @_;
21  
22 0 return sprintf 'curry(%s, %s)',
23 $self->function,
24 join q{, }, $self->args;
25 }
26  
27 1 ▶sub codify{
Subroutine codify: called CC=1 SCAR=0.0
Pod undocumented
28 1 my($self) = @_;
29  
30 1 my $function = $self->function;
31 1 my @args = $self->args;
32  
33 1 ▶ return sub{
Subroutine __ANON__: called CC=1 SCAR=0.0
34 1 @_ = map{ &{$_} } @args;
35 1 goto &{$function};
36 1 };
37 }
38  
39 4 __PACKAGE__->meta->make_immutable();
40  
« Expr/Placeholder.pm ↑ Summary Expr/Method.pm »