lib/App/SeismicUnixGui/misc/Math.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 30 CC 4 SCAR 24.0
CC
4
Cov
0%
compute
20.0
BEGIN
2.0
BEGIN
2.0
CRAP 11.0
1 package Math;
2 use strict;
3 use warnings;
4 use 5.010;
5  
6 use base 'Exporter';
7 our @EXPORT_OK = qw(compute);
8  
9 sub compute {
10 my ( $operator, $x, $y ) = @_;
11  
12 if ( $operator eq '+' ) {
13 return $x + $y;
14 }
15 elsif ( $operator eq '-' ) {
16 return $x - $y;
17 }
18 elsif ( $operator eq '*' ) {
19 return $x - $y;
20 }
21 }
22  
23 1;