line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Junkai::HUANG::Utils;
|
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
331
|
use 5.006;
|
|
1
|
|
|
|
|
2
|
|
4
|
1
|
|
|
1
|
|
3
|
use strict;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
5
|
1
|
|
|
1
|
|
2
|
use warnings;
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
21
|
|
6
|
1
|
|
|
1
|
|
3
|
use Exporter qw(import);
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
157
|
|
7
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
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
|
|
|
|
0
|
1
|
|
sub function1 {
|
45
|
|
|
|
|
|
|
}
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 function2
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=cut
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
0
|
1
|
|
sub function2 {
|
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
|
|
|
2
|
1
|
531
|
my $sum;
|
62
|
2
|
|
|
|
|
3
|
foreach ( @_ ) {
|
63
|
17
|
100
|
|
|
|
32
|
if(/(\d+)/){
|
64
|
14
|
|
|
|
|
18
|
$sum += $1
|
65
|
|
|
|
|
|
|
}
|
66
|
|
|
|
|
|
|
}
|
67
|
2
|
|
|
|
|
6
|
return $sum;
|
68
|
|
|
|
|
|
|
}
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 AUTHOR
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Junkai.Huang, C<< >>
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 BUGS
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or through
|
77
|
|
|
|
|
|
|
the web interface at L. 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
|
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation
|
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
L
|
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=item * CPAN Ratings
|
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
L
|
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=item * Search CPAN
|
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
L
|
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
|
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; # End of Junkai::HUANG::Utils
|