| 1 | package Acme::Lambda::Expr::UniOp; # Abstract Class | ||
| 2 | |||
| 3 | 4 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 4 | extends qw(Acme::Lambda::Expr::Term); | |
| 5 | |||
| 6 | 4 | has operand => ( | |
| 7 | is => 'ro', | ||
| 8 | isa => 'Acme::Lambda::Expr::Term', | ||
| 9 | |||
| 10 | coerce => 1, | ||
| 11 | required => 1, | ||
| 12 | ); | ||
| 13 | |||
| 14 | sub symbol; # abstract | ||
| 15 | |||
| 16 | 27 | ▶ | sub deparse{ |
|
Subroutine
deparse: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 17 | 27 | my($self) = @_; | |
| 18 | 27 | return sprintf '%s(%s)', $self->symbol, $self->operand->deparse; | |
| 19 | |||
| 20 | } | ||
| 21 | 0 | ▶ | sub stringify{ |
|
Subroutine
stringify: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 22 | 0 | my($self) = @_; | |
| 23 | 0 | return sprintf '%s(%s)', $self->symbol, $self->operand; | |
| 24 | } | ||
| 25 | |||
| 26 | 13 | ▶ | sub generate{ |
|
Subroutine
generate: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 27 | 13 | my($class, $operand) = @_; | |
| 28 | 13 | return $class->new(operand => $operand); | |
| 29 | } | ||
| 30 | |||
| 31 | 4 | __PACKAGE__->meta->make_immutable(); | |