| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package PkgConfig::LibPkgConf::Fragment; |
|
2
|
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
82762
|
use strict; |
|
|
3
|
|
|
|
|
15
|
|
|
|
3
|
|
|
|
|
82
|
|
|
4
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
|
3
|
|
|
|
|
5
|
|
|
|
3
|
|
|
|
|
138
|
|
|
5
|
3
|
|
|
3
|
|
971
|
use overload '""' => sub { shift->to_string }; |
|
|
3
|
|
|
23
|
|
851
|
|
|
|
3
|
|
|
|
|
36
|
|
|
|
23
|
|
|
|
|
2141
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.10'; |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
PkgConfig::LibPkgConf::Fragment - Single compiler or linker flag |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use PkgConfig::LibPkgConf::Client; |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $client = PkgConfig::LibPkgConf::Client->new; |
|
18
|
|
|
|
|
|
|
$client->scan_all(sub { |
|
19
|
|
|
|
|
|
|
my($client, $package) = @_; |
|
20
|
|
|
|
|
|
|
# $package isa PkgConfig::LibPkgConf::Package |
|
21
|
|
|
|
|
|
|
foreach my $frag ($package->list_libs) |
|
22
|
|
|
|
|
|
|
{ |
|
23
|
|
|
|
|
|
|
# $frag isa PkgConfig::LibPkgConf::Fragment |
|
24
|
|
|
|
|
|
|
if($frag->type eq 'L') |
|
25
|
|
|
|
|
|
|
{ |
|
26
|
|
|
|
|
|
|
say "Library directory: ", $frag->data; |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
elsif($frag->type eq 'l') |
|
29
|
|
|
|
|
|
|
{ |
|
30
|
|
|
|
|
|
|
say "Library name: ", $frag->data; |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
}); |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
TODO |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head2 type |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
my $type = $frag->type; |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
The type of the flag. This may be C if there is no type. |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |
|
48
|
|
|
|
|
|
|
|
|
49
|
39
|
|
|
39
|
1
|
11223
|
sub type { shift->{type} } |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 data |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
my $data = $frag->data; |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
The data for the fragment. |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut |
|
58
|
|
|
|
|
|
|
|
|
59
|
39
|
|
|
39
|
1
|
105
|
sub data { shift->{data} } |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head2 to_string |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
my $string = $frag->to_string; |
|
64
|
|
|
|
|
|
|
my $string = "$frag"; |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
The string representation of the fragment. You may also interpolate the |
|
67
|
|
|
|
|
|
|
fragment object inside a string to convert it into a string. |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=cut |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub to_string |
|
72
|
|
|
|
|
|
|
{ |
|
73
|
26
|
|
|
26
|
1
|
56
|
my($self) = @_; |
|
74
|
26
|
|
|
|
|
72
|
my($type, $data) = ($self->type, $self->data); |
|
75
|
26
|
|
|
|
|
58
|
$data =~ s/\\(\s)/$1/g; |
|
76
|
26
|
100
|
|
|
|
106
|
$type ? "-$type$data" : $data; |
|
77
|
|
|
|
|
|
|
} |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 SUPPORT |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
IRC #native on irc.perl.org |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Project GitHub tracker: |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
L |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
If you want to contribute, please open a pull request on GitHub: |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
L |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
For additional related modules, see L |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 AUTHOR |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Graham Ollis |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
For additional contributors see L |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
This software is copyright (c) 2016 Graham Ollis. |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
This is free software; you may redistribute it and/or modify it under |
|
106
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=cut |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
1; |