line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#=============================================================================== |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# FILE: Util.pm |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# DESCRIPTION: NetSDS utilities |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# AUTHOR: Michael Bochkaryov (Rattler), <misha@rattler.kiev.ua> |
8
|
|
|
|
|
|
|
# COMPANY: Net.Style |
9
|
|
|
|
|
|
|
# CREATED: 24.07.2009 09:38:14 UTC |
10
|
|
|
|
|
|
|
#=============================================================================== |
11
|
|
|
|
|
|
|
=head1 NAME |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
NetSDS::Util - supplementary NetSDS packages |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 SYNOPSIS |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
use NetSDS::Util::Convert; |
18
|
|
|
|
|
|
|
use NetSDS::Util::String; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
my $trim_str = str_trim(" Some string with leading and trailing "); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 DESCRIPTION |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
C<NetSDS::Util> modules contains functions useful for everyday tasks. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=over |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=item B<NetSDS::Util::Convert> - data format conversions |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=item B<NetSDS::Util::DateTime> - processing date and time |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=item B<NetSDS::Util::File> - work with files and catalogs |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=item B<NetSDS::Util::Spreadsheet> - processing spreadsheet files |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=item B<NetSDS::Util::Misc> - miscelaneous routines |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=item B<NetSDS::Util::String> - text and binary strings processing |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=item B<NetSDS::Util::Struct> - data structures conversion |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=item B<NetSDS::Util::Translit> - transliteration |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=item B<NetSDS::Util::Types> - work with data types |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=back |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=cut |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
package NetSDS::Util; |
52
|
|
|
|
|
|
|
|
53
|
2
|
|
|
2
|
|
43787
|
use 5.8.0; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
126
|
|
54
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
82
|
|
55
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
57
|
|
|
2
|
|
|
|
|
64
|
|
56
|
|
|
|
|
|
|
|
57
|
2
|
|
|
2
|
|
1847
|
use version; our $VERSION = "1.044"; |
|
2
|
|
|
|
|
4654
|
|
|
2
|
|
|
|
|
12
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
__END__ |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 BUGS |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Unknown yet |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 SEE ALSO |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
L<NetSDS::Util::Convert> |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
L<NetSDS::Util::DateTime> |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
L<NetSDS::Util::File> |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
L<NetSDS::Util::Spreadsheet> |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
L<NetSDS::Util::Misc> |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
L<NetSDS::Util::String> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
L<NetSDS::Util::Struct>, |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
L<NetSDS::Util::Translit> |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
L<NetSDS::Util::Types> |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 TODO |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Implement functional tests. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 AUTHOR |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Valentyn Solomko <pere@pere.org.ua> |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Michael Bochkaryov <misha@rattler.kiev.ua> |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Yana Kornienko <yana@netstyle.com.ua> |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 LICENSE |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Copyright (C) 2008-2009 Michael Bochkaryov |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify |
105
|
|
|
|
|
|
|
it under the terms of the GNU General Public License as published by |
106
|
|
|
|
|
|
|
the Free Software Foundation; either version 2 of the License, or |
107
|
|
|
|
|
|
|
(at your option) any later version. |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful, |
110
|
|
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
111
|
|
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
112
|
|
|
|
|
|
|
GNU General Public License for more details. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License |
115
|
|
|
|
|
|
|
along with this program; if not, write to the Free Software |
116
|
|
|
|
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=cut |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
|