line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# This file is part of Riak-Light |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# This software is copyright (c) 2013 by Weborama. |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# This is free software; you can redistribute it and/or modify it under |
7
|
|
|
|
|
|
|
# the same terms as the Perl 5 programming language system itself. |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
## no critic (RequireUseStrict, RequireUseWarnings) |
10
|
|
|
|
|
|
|
package Riak::Light::Util; |
11
|
|
|
|
|
|
|
{ |
12
|
|
|
|
|
|
|
$Riak::Light::Util::VERSION = '0.10'; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
## use critic |
15
|
5
|
|
|
5
|
|
1799
|
use Config; |
|
5
|
|
|
|
|
14
|
|
|
5
|
|
|
|
|
217
|
|
16
|
5
|
|
|
5
|
|
27
|
use Exporter 'import'; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
692
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
@EXPORT_OK = qw(is_windows is_netbsd is_solaris); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
#ABSTRACT: util class, provides is_windows, is_solaris, etc |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub is_windows { |
23
|
5
|
|
|
5
|
0
|
314
|
$Config{osname} eq 'MSWin32'; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub is_netbsd { |
27
|
5
|
|
|
5
|
0
|
2277
|
$Config{osname} eq 'netbsd'; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub is_solaris { |
31
|
5
|
|
|
5
|
0
|
2051
|
$Config{osname} eq 'solaris'; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |