| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package PkgConfig::LibPkgConf::Util; |
|
2
|
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
100148
|
use strict; |
|
|
4
|
|
|
|
|
18
|
|
|
|
4
|
|
|
|
|
118
|
|
|
4
|
4
|
|
|
4
|
|
26
|
use warnings; |
|
|
4
|
|
|
|
|
9
|
|
|
|
4
|
|
|
|
|
158
|
|
|
5
|
4
|
|
|
4
|
|
25
|
use base qw( Exporter ); |
|
|
4
|
|
|
|
|
8
|
|
|
|
4
|
|
|
|
|
432
|
|
|
6
|
4
|
|
|
4
|
|
442
|
use PkgConfig::LibPkgConf::XS; |
|
|
4
|
|
|
|
|
18
|
|
|
|
4
|
|
|
|
|
303
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.11'; |
|
9
|
|
|
|
|
|
|
our @EXPORT_OK = qw( argv_split compare_version path_sep path_relocate ); |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 NAME |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
PkgConfig::LibPkgConf::Util - Non OO functions for PkgConfig::LibPkgConf |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
use PkgConfig::LibPkgConf::Util qw( argv_split compare_version ); |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
my @args = argv_split('-L/foo -lfoo'); # ('-L/foo', '-lfoo'); |
|
20
|
|
|
|
|
|
|
my $cmp = compare_version('1.2.3','1.2.4'); |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
This module provides some useful utility functions that come along with |
|
25
|
|
|
|
|
|
|
C, but are not object oriented and thus do not get their own |
|
26
|
|
|
|
|
|
|
class. |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 FUNCTIONS |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head2 argv_split |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
my @argv = argv_split $args; |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Splits a string into an argument list. |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head2 compare_version |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my $cmp = compare_version($version1, $version2); |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Compare versions using RPM version comparison rules as described in the LSB. |
|
41
|
|
|
|
|
|
|
Returns -1 if the first version is greater, 0 if both versions are equal, |
|
42
|
|
|
|
|
|
|
1 if the second version is greater. |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head2 path_relocate |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
my $path = path_relocate($path); |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Relocates a path, possibly calling realpath() or cygwin_conv_path() on it. |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head2 path_sep |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
my $sep = path_sep; |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Returns the path separator as understood by C. This is usually |
|
55
|
|
|
|
|
|
|
C<:> on UNIX and C<;> on Windows. |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 SUPPORT |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
IRC #native on irc.perl.org |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Project GitHub tracker: |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
L |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
If you want to contribute, please open a pull request on GitHub: |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
L |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
For additional related modules, see L |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 AUTHOR |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Graham Ollis |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
For additional contributors see L |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
This software is copyright (c) 2016 Graham Ollis. |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
This is free software; you may redistribute it and/or modify it under |
|
84
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=cut |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
1; |