File Coverage

blib/lib/RPerl/Algorithm.pm
Criterion Covered Total %
statement 88 101 87.1
branch 0 10 0.0
condition 0 3 0.0
subroutine 30 31 96.7
pod 0 1 0.0
total 118 146 80.8


line stmt bran cond sub pod time code
1             # [[[ HEADER ]]]
2             package RPerl::Algorithm;
3 1     1   340 use strict;
  1     1   3  
  1     2   30  
  1         7472  
  1         2  
  1         23  
  2         12121  
  2         6  
  2         63  
4 1     1   5 use warnings;
  1     1   2  
  1     2   24  
  1         4  
  1         2  
  1         23  
  2         10  
  2         5  
  2         65  
5 1     1   6 use RPerl::AfterSubclass;
  1     1   2  
  1     2   122  
  1         6  
  1         3  
  1         123  
  2         15  
  2         3  
  2         337  
6             our $VERSION = 0.010_000;
7              
8             # [[[ OO INHERITANCE ]]]
9 1     1   8 use parent qw(RPerl::CompileUnit::Module::Class); # no non-system inheritance, only inherit from base class
  1     1   2  
  1         10  
  1         6  
  1         3  
  1         9  
10 1     1   103 use RPerl::CompileUnit::Module::Class;
  1     1   4  
  1         58  
  1         59  
  1         3  
  1         31  
11              
12 1     1   7 # [[[ CRITICS ]]]
  1     1   2  
  1         21  
  1         13  
  1         4  
  1         30  
13 1     1   4 ## no critic qw(ProhibitUselessNoCritic ProhibitMagicNumbers RequireCheckedSyscalls) # USER DEFAULT 1: allow numeric values & print operator
  1     1   2  
  1         313  
  1         6  
  1         4  
  1         337  
14             ## no critic qw(RequireInterpolationOfMetachars) # USER DEFAULT 2: allow single-quoted control characters & sigils
15             ## no critic qw(ProhibitConstantPragma ProhibitMagicNumbers) # USER DEFAULT 3: allow constants
16              
17             # [[[ CONSTANTS ]]]
18 1     1   10 use constant TIME_BEST => my string $TYPED_TIME_BEST = '<<< UNKNOWN >>>';
  1     1   3  
  1         137  
  1         5  
  1         2  
  1         56  
19 1     1   10 use constant TIME_AVERAGE => my string $TYPED_TIME_AVERAGE = '<<< UNKNOWN >>>';
  1     1   7  
  1     1   83  
  1         2086  
  1         5  
  1         2  
  1         48  
20 1     1   7 use constant TIME_WORST => my string $TYPED_TIME_WORST = '<<< UNKNOWN >>>';
  1     1   3  
  1         75  
  1         5  
  1         2  
  1         46  
21 1     1   6 use constant SPACE_WORST => my string $TYPED_SPACE_WORST = '<<< UNKNOWN >>>';
  1     1   8  
  1         321  
  1         5  
  1         2  
  1         267  
22              
23             # [[[ OO PROPERTIES ]]]
24 0     0 0 0 our hashref $properties = { foo => my string $TYPED_foo = '<<< DEFAULT, ALGORITHM >>>' };
25 0 0 0     0  
26 0         0 # [[[ SUBROUTINES & OO METHODS ]]]
27              
28             # [ INHERITANCE TESTING ]
29              
30 0 0       0 our void::method $inherited__Algorithm = sub {
31 0         0 ( my RPerl::Algorithm $self, my string $person ) = @ARG;
32             RPerl::diag(
33             'in PERLOPS_PERLTYPES Algorithm->inherited__Algorithm(), have ::class($self) = ' . ::class($self) . ' and $person = ' . $person . ', FNORD' . "\n" );
34             };
35              
36 0         0 our string::method $inherited__Algorithm_foo_get = sub {
37             ( my RPerl::Algorithm $self ) = @ARG;
38             RPerl::diag( 'in PERLOPS_PERLTYPES Algorithm->inherited__Algorithm_foo_get(), have ::class($self) = ' . ::class($self) . ', FNORD' . "\n" );
39 0 0       0 return $self->{foo};
40             };
41              
42             our void::method $inherited__Algorithm_foo_set = sub {
43 0         0 ( my RPerl::Algorithm $self, my string $foo_new ) = @ARG;
44             RPerl::diag( 'in PERLOPS_PERLTYPES Algorithm->inherited__Algorithm_foo_set(), have ::class($self) = ' . ::class($self) . ' and $foo_new = ' . $foo_new . ', FNORD' . "\n" );
45             $self->{foo} = $foo_new;
46             };
47              
48             #our void::method $inherited = sub {
49             # ( my RPerl::Algorithm $self, my string $person ) = @ARG;
50             # RPerl::diag('in PERLOPS_PERLTYPES Algorithm->inherited(), have ::class($self) = ' . ::class($self) . ' and $person = ' . $person . ', IS' . "\n");
51             #};
52              
53 0         0 our string $uninherited__Algorithm = sub {
54 0         0 ( my string $person ) = @ARG;
55             RPerl::diag( 'in PERLOPS_PERLTYPES Algorithm::uninherited__Algorithm(), received $person = ' . $person . ', MYSTIC' . "\n" );
56             return 'Algorithm::uninherited__Algorithm() RULES! PERLOPS_PERLTYPES';
57             };
58 0 0       0  
59 0 0       0 #our string $uninherited = sub {
  0         0  
60             # ( my string $person ) = @ARG;
61             # RPerl::diag( 'in PERLOPS_PERLTYPES Algorithm::uninherited(), received $person = ' . $person . ', TERRITORY' . "\n" );
62             # return 'Algorithm::uninherited() ROCKS! PERLOPS_PERLTYPES';
63             #};
64              
65             1; # end of class