blib/lib/Junkai/HUANG/Utils.pm

filter: Statementstmt 100% 19 / 19 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 100% 3 / 3 totaltotal 93.5% 29 / 31 SCAR 11.0
CC
3
Cov
100%
sum
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« Build ↑ Summary
1 package Junkai::HUANG::Utils;
2
3 1 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Exporter qw(import);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 our @EXPORT = qw( sum );
8
9 =head1 NAME
10
11 Junkai::HUANG::Utils - The great new Junkai::HUANG::Utils!
12
13 =head1 VERSION
14
15 Version 0.01
16
17 =cut
18
19 1 our $VERSION = '0.01';
20
21
22 =head1 SYNOPSIS
23
24 Quick summary of what the module does.
25
26 Perhaps a little code snippet.
27
28 use Junkai::HUANG::Utils;
29
30 my $foo = Junkai::HUANG::Utils->new();
31 ...
32
33 =head1 EXPORT
34
35 A list of functions that can be exported. You can delete this section
36 if you don't export anything, such as for a purely object-oriented module.
37
38 =head1 SUBROUTINES/METHODS
39
40 =head2 function1
41
42 =cut
43
44 ▶sub function1 {
Subroutine function1: not called CC=1 SCAR=0.0
Pod documented
45 }
46
47 =head2 function2
48
49 =cut
50
51 ▶sub function2 {
Subroutine function2: not called CC=1 SCAR=0.0
Pod documented
52 }
53
54
55 =head2 sum( LIST )
56 Numerically sums the argument list and returns the result.
57
58 =cut
59
60 sub sum {
61 2 ▶ my $sum;
Subroutine sum: called CC=3 SCAR=11.0
Pod documented
62 2 foreach ( @_ ) {
63 17 ▶ if(/(\d+)/){
Branch: 1 branch
BranchTrueFalseTotal
if (/(\d+)/) 14 3 17
64 14 $sum += $1
65 }
66 }
67 2 return $sum;
68 }
69
70 =head1 AUTHOR
71
72 Junkai.Huang, C<< <Junkai.Huang at valeo.valeo.com> >>
73
74 =head1 BUGS
75
76 Please report any bugs or feature requests to C<bug-junkai-huang-utils at rt.cpan.org>, or through
77 the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Junkai-HUANG-Utils>. I will be notified, and then you'll
78 automatically be notified of progress on your bug as I make changes.
79
80
81
82
83 =head1 SUPPORT
84
85 You can find documentation for this module with the perldoc command.
86
87 perldoc Junkai::HUANG::Utils
88
89
90 You can also look for information at:
91
92 =over 4
93
94 =item * RT: CPAN's request tracker (report bugs here)
95
96 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Junkai-HUANG-Utils>
97
98 =item * AnnoCPAN: Annotated CPAN documentation
99
100 L<http://annocpan.org/dist/Junkai-HUANG-Utils>
101
102 =item * CPAN Ratings
103
104 L<http://cpanratings.perl.org/d/Junkai-HUANG-Utils>
105
106 =item * Search CPAN
107
108 L<http://search.cpan.org/dist/Junkai-HUANG-Utils/>
109
110 =back
111
112
113 =head1 ACKNOWLEDGEMENTS
114
115
116 =head1 LICENSE AND COPYRIGHT
117
118 Copyright 2016 Junkai.Huang.
119
120 This program is free software; you can redistribute it and/or modify it
121 under the terms of the the Artistic License (2.0). You may obtain a
122 copy of the full license at:
123
124 L<http://www.perlfoundation.org/artistic_license_2_0>
125
126 Any use, modification, and distribution of the Standard or Modified
127 Versions is governed by this Artistic License. By using, modifying or
128 distributing the Package, you accept this license. Do not use, modify,
129 or distribute the Package, if you do not accept this license.
130
131 If your Modified Version has been derived from a Modified Version made
132 by someone other than you, you are nevertheless required to ensure that
133 your Modified Version complies with the requirements of this license.
134
135 This license does not grant you the right to use any trademark, service
136 mark, tradename, or logo of the Copyright Holder.
137
138 This license includes the non-exclusive, worldwide, free-of-charge
139 patent license to make, have made, use, offer to sell, sell, import and
140 otherwise transfer the Package with respect to any patent claims
141 licensable by the Copyright Holder that are necessarily infringed by the
142 Package. If you institute patent litigation (including a cross-claim or
143 counterclaim) against any party alleging that the Package constitutes
144 direct or contributory patent infringement, then this Artistic License
145 to you shall terminate on the date that such litigation is filed.
146
147 Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER
148 AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
149 THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
150 PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY
151 YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR
152 CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR
153 CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,
154 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
155
156
157 =cut
158
159 1 1; # End of Junkai::HUANG::Utils
« Build ↑ Summary