File Coverage

lib/Perlmazing/Perlmazing/pl.pm
Criterion Covered Total %
statement 28 28 100.0
branch 13 20 65.0
condition 4 6 66.6
subroutine 5 5 100.0
pod 0 1 0.0
total 50 60 83.3


line stmt bran cond sub pod time code
1 1     1   8 use strict;
  1         2  
  1         26  
2 1     1   4 use warnings;
  1         2  
  1         24  
3 1     1   3 use Perlmazing;
  1         2  
  1         5  
4            
5             sub main {
6 10     10 0 15860 my $offset = 0;
7 10 50 66     33 (@_) = ($_) if not @_ and defined $_;
8 10 100 66     40 if (not defined wantarray) {
    100          
    50          
9 4         7 foreach my $i (@_) {
10 1     1   8 no warnings;
  1         2  
  1         252  
11 13 50       28 defined($i) ? print "$i\n" : print "\n";
12             }
13 4 100       14 print "\n" if not @_;
14             } elsif (defined wantarray and not wantarray) {
15 3         3 my $res;
16 3         6 foreach my $i (@_) {
17 13 50       22 $res .= defined($i) ? "$i\n" : "\n";
18             }
19 3 50       6 return "\n" if not @_;
20 3         8 return $res;
21             } elsif (wantarray) {
22 3         4 my @res;
23 3         7 foreach my $i (@_) {
24 13 50       25 push @res, defined($i) ? "$i\n" : "\n";
25             }
26 3 50       7 return "\n" if not @_;
27 3         10 return @res;
28             }
29             }
30            
31             1;