| 1 | package JavaScript::Code::Expression::Node::Arithmetic; | ||
| 2 | |||
| 3 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | ▶ | use vars qw[ $VERSION ]; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 2 | ▶ | use base qw[ JavaScript::Code::Expression::Node ]; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 2 | ▶ | use JavaScript::Code::Expression::Arithmetic (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | use overload | ||
| 10 | 2 | ▶ | '+' => \&addition, |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | '-' => \&subtraction, | ||
| 12 | '*' => \&multiplication, | ||
| 13 | 2 | '/' => \&division; | |
| 14 | |||
| 15 | 2 | $VERSION = '0.08'; | |
| 16 | |||
| 17 | =head1 NAME | ||
| 18 | |||
| 19 | JavaScript::Code::Expression::Node::Arithmetic - A Node For JavaScript Arithmetic Expressions | ||
| 20 | |||
| 21 | =head1 METHODS | ||
| 22 | |||
| 23 | =head2 $self->addition( ... ) | ||
| 24 | |||
| 25 | =cut | ||
| 26 | |||
| 27 | 0 | ▶ | sub addition { |
|
Subroutine
addition: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 28 | 0 | return JavaScript::Code::Expression::Arithmetic::addition(@_); | |
| 29 | } | ||
| 30 | |||
| 31 | =head2 $self->subtraction( ... ) | ||
| 32 | |||
| 33 | =cut | ||
| 34 | |||
| 35 | 0 | ▶ | sub subtraction { |
|
Subroutine
subtraction: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 36 | 0 | return JavaScript::Code::Expression::Arithmetic::subtraction(@_); | |
| 37 | } | ||
| 38 | |||
| 39 | =head2 $self->multiplication( ... ) | ||
| 40 | |||
| 41 | =cut | ||
| 42 | |||
| 43 | 0 | ▶ | sub multiplication { |
|
Subroutine
multiplication: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 44 | 0 | return JavaScript::Code::Expression::Arithmetic::multiplication(@_); | |
| 45 | } | ||
| 46 | |||
| 47 | =head2 $self->division( ... ) | ||
| 48 | |||
| 49 | =cut | ||
| 50 | |||
| 51 | 0 | ▶ | sub division { |
|
Subroutine
division: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 52 | 0 | return JavaScript::Code::Expression::Arithmetic::division(@_); | |
| 53 | } | ||
| 54 | |||
| 55 | =head1 SEE ALSO | ||
| 56 | |||
| 57 | L<JavaScript::Code> | ||
| 58 | |||
| 59 | =head1 AUTHOR | ||
| 60 | |||
| 61 | Sascha Kiefer, C<esskar@cpan.org> | ||
| 62 | |||
| 63 | =head1 LICENSE | ||
| 64 | |||
| 65 | This library is free software, you can redistribute it and/or modify it under | ||
| 66 | the same terms as Perl itself. | ||
| 67 | |||
| 68 | =cut | ||
| 69 | |||
| 70 | 2 | 1; | |
| 71 | |||