Code/Expression/Arithmetic.pm

filter: Statementstmt 50.0% 12 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 42.8% 3 / 7 Podpod 100% 4 / 4 totaltotal 54.2% 19 / 35 CC 1 SCAR 4.5
CC
1
Cov
50%
addition
2.0
subtraction
2.0
multiplication
2.0
CRAP 1.6
« Code/Expression/Op/Subtraction.pm ↑ Summary Code/Expression/Node/Arithmetic.pm »
1 package JavaScript::Code::Expression::Arithmetic;
2
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use vars qw[ $VERSION @EXPORT_OK ];
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use base qw[
Subroutine BEGIN: called CC=1 SCAR=0.0
6 JavaScript::Code::Expression
7 JavaScript::Code::Expression::Node::Arithmetic
8 Exporter
9 2 ];
10
11 2 @EXPORT_OK = qw[ ADD SUB MUL DIV ];
12
13 2 $VERSION = '0.08';
14
15 =head1 NAME
16
17 JavaScript::Code::Expression::Arithmetic - A JavaScript Arithmetic Expression
18
19 =head1 METHODS
20
21 =cut
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 my $e = __PACKAGE__->new;
29 0 $e->command( 'Addition', @_ );
30 0 return $e;
31 }
32
33 =head2 $self->subtraction( ... )
34
35 =cut
36
37 0 ▶sub subtraction {
Subroutine subtraction: not called CC=1 SCAR=6.9
Pod documented
38 0 my $e = __PACKAGE__->new;
39 0 $e->command( 'Subtraction', @_ );
40 0 return $e;
41 }
42
43 =head2 $self->multiplication( ... )
44
45 =cut
46
47 0 ▶sub multiplication {
Subroutine multiplication: not called CC=1 SCAR=6.9
Pod documented
48 0 my $e = __PACKAGE__->new;
49 0 $e->command( 'Multiplication', @_ );
50 0 return $e;
51 }
52
53 =head2 $self->division( ... )
54
55 =cut
56
57 0 ▶sub division {
Subroutine division: not called CC=1 SCAR=6.9
Pod documented
58 0 my $e = __PACKAGE__->new;
59 0 $e->command( 'Division', @_ );
60 0 return $e;
61 }
62
63 =head2 ADD
64
65 =head2 SUB
66
67 =head2 MUL
68
69 =head2 DIV
70
71 sub ADD { &addition }
72 sub SUB { &subtraction }
73 sub MUL { &multiplication }
74 sub DIV { &division }
75
76 =head1 SEE ALSO
77
78 L<JavaScript::Code>
79
80 =head1 AUTHOR
81
82 Sascha Kiefer, C<esskar@cpan.org>
83
84 =head1 LICENSE
85
86 This library is free software, you can redistribute it and/or modify it under
87 the same terms as Perl itself.
88
89 =cut
90
91 2 1;
« Code/Expression/Op/Subtraction.pm ↑ Summary Code/Expression/Node/Arithmetic.pm »