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   13 use strict;
  1         4  
  1         50  
2 1     1   5 use warnings;
  1         3  
  1         90  
3 1     1   6 use Perlmazing;
  1         2  
  1         9  
4              
5             sub main {
6 10     10 0 29388 my $offset = 0;
7 10 50 66     54 (@_) = ($_) if not @_ and defined $_;
8 10 100 66     60 if (not defined wantarray) {
    100          
    50          
9 4         9 foreach my $i (@_) {
10 1     1   9 no warnings;
  1         2  
  1         569  
11 13 50       39 defined($i) ? print "$i\n" : print "\n";
12             }
13 4 100       20 print "\n" if not @_;
14             } elsif (defined wantarray and not wantarray) {
15 3         5 my $res;
16 3         7 foreach my $i (@_) {
17 13 50       36 $res .= defined($i) ? "$i\n" : "\n";
18             }
19 3 50       8 return "\n" if not @_;
20 3         12 return $res;
21             } elsif (wantarray) {
22 3         6 my @res;
23 3         9 foreach my $i (@_) {
24 13 50       37 push @res, defined($i) ? "$i\n" : "\n";
25             }
26 3 50       12 return "\n" if not @_;
27 3         16 return @res;
28             }
29             }
30              
31             1;