File Coverage

blib/lib/Acme/Cavaspazi.pm
Criterion Covered Total %
statement 13 13 100.0
branch 2 2 100.0
condition n/a
subroutine 3 3 100.0
pod 1 1 100.0
total 19 19 100.0


line stmt bran cond sub pod time code
1             package Acme::Cavaspazi;
2             # ABSTRACT: a simple function to remove spaces from strings or lists of strings
3              
4 3     3   2086 use 5.012;
  3         11  
5 3     3   47 use warnings;
  3         7  
  3         600  
6             require Exporter;
7             our @ISA = qw(Exporter);
8              
9             # Export subroutine cavaspazi
10             our @EXPORT = qw(cavaspazi);
11              
12             $Acme::Cavaspazi::VERSION = "1.0.3";
13              
14              
15              
16             sub cavaspazi {
17 2     2 1 828 my @results = ();
18 2         5 for my $i (@_) {
19 3         5 my $result = $i;
20 3         12 $result =~ s/ /_/g;
21 3         8 push @results, $result;
22             }
23             # if input is a scalar, return a scalar
24 2 100       6 if (@_ == 1) {
25 1         3 return $results[0];
26             } else {
27 1         5 return @results;
28             }
29            
30             }
31              
32              
33             "VITULO";
34              
35             __END__