blib/lib/Acme/DTUCKWELL/Utils.pm

filter: Statementstmt 100% 23 / 23 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 50.0% 1 / 2 totaltotal 93.9% 31 / 33 CC 3 SCAR 5.6
CC
3
Cov
100%
sum
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.8
↑ Summary
1 package Acme::DTUCKWELL::Utils;
2  
3 2 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 ▶use Exporter qw(import);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 our @EXPORT = qw(sum);
9  
10 2 our %EXPORT_TAGS = (
11 all => [ @EXPORT ]
12 );
13  
14 =head1 NAME
15  
16 Acme::DTUCKWELL::Utils - The great new Acme::DTUCKWELL::Utils!
17  
18 =head1 VERSION
19  
20 Version 0.03
21  
22 =cut
23  
24 2 our $VERSION = '0.03';
25  
26  
27 =head1 SYNOPSIS
28  
29 Quick summary of what the module does.
30  
31 Perhaps a little code snippet.
32  
33 use Acme::DTUCKWELL::Utils;
34  
35 my $foo = Acme::DTUCKWELL::Utils->new();
36 ...
37  
38 =head1 EXPORT
39  
40 A list of functions that can be exported. You can delete this section
41 if you don't export anything, such as for a purely object-oriented module.
42  
43 =head1 SUBROUTINES/METHODS
44  
45 =head2 function1
46  
47 =cut
48  
49 2 ▶sub sum {
Subroutine sum: called CC=3 SCAR=11.0
Pod undocumented
50  
51 2 my @inputlist = @_;
52 2 my $sum = 0;
53 #my $sum = 1;
54 OUTER:
55 2 for my $each (@inputlist) {
56 11 ▶ if ($each =~ /[A-Za-z]/){
Branch: 1 branch
BranchTrueFalseTotal
if ($each =~ /[A-Za-z]/) 1 10 11
57 1 $sum = 'Invalid';
58 1 last OUTER;
59 #die 'Only numbers allowed';
60 };
61 10 $sum += $each;
62 #$sum = $sum * $each;
63 }
64 2 return $sum;
65
66 }
67  
68 =head2 function2
69  
70 =cut
71  
72 0 ▶sub function2 {
Subroutine function2: not called CC=1 SCAR=0.0
Pod documented
73 }
74  
75 =head1 AUTHOR
76  
77 DTUCKWELL, C<< <dstuckwell at novartis.com> >>
78  
79 =head1 BUGS
80  
81 Please report any bugs or feature requests to C<bug-acme-dtuckwell-utils at rt.cpan.org>, or through
82 the web interface at L<https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Acme-DTUCKWELL-Utils>. I will be notified, and then you'll
83 automatically be notified of progress on your bug as I make changes.
84  
85  
86  
87  
88 =head1 SUPPORT
89  
90 You can find documentation for this module with the perldoc command.
91  
92 perldoc Acme::DTUCKWELL::Utils
93  
94  
95 You can also look for information at:
96  
97 =over 4
98  
99 =item * RT: CPAN's request tracker (report bugs here)
100  
101 L<https://rt.cpan.org/NoAuth/Bugs.html?Dist=Acme-DTUCKWELL-Utils>
102  
103 =item * CPAN Ratings
104  
105 L<https://cpanratings.perl.org/d/Acme-DTUCKWELL-Utils>
106  
107 =item * Search CPAN
108  
109 L<https://metacpan.org/release/Acme-DTUCKWELL-Utils>
110  
111 =back
112  
113  
114 =head1 ACKNOWLEDGEMENTS
115  
116  
117 =head1 LICENSE AND COPYRIGHT
118  
119 This software is Copyright (c) 2023 by DTUCKWELL.
120  
121 This is free software, licensed under:
122  
123 The Artistic License 2.0 (GPL Compatible)
124  
125  
126 =cut
127  
128 2 1; # End of Acme::DTUCKWELL::Utils
↑ Summary