line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
68732
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
2
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
44
|
|
3
|
|
|
|
|
|
|
package Alien::Google::GRPC; |
4
|
|
|
|
|
|
|
$Alien::Google::GRPC::VERSION = '0.05'; |
5
|
1
|
|
|
1
|
|
5
|
use base qw( Alien::Base ); |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
1089
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 NAME |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Alien::Google::GRPC - Locates installed gRPC library. If not, downloads from Github and does a local install. |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
In your Build.PL: |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
use Module::Build; |
18
|
|
|
|
|
|
|
use Alien::Google::GRPC; |
19
|
|
|
|
|
|
|
my $builder = Module::Build->new( |
20
|
|
|
|
|
|
|
... |
21
|
|
|
|
|
|
|
configure_requires => { |
22
|
|
|
|
|
|
|
'Alien::Google::GRPC' => '0', |
23
|
|
|
|
|
|
|
... |
24
|
|
|
|
|
|
|
}, |
25
|
|
|
|
|
|
|
extra_compiler_flags => Alien::Google::GRPC->cflags, |
26
|
|
|
|
|
|
|
extra_linker_flags => Alien::Google::GRPC->libs, |
27
|
|
|
|
|
|
|
... |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
$build->create_build_script; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
In your Makefile.PL: |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
use ExtUtils::MakeMaker; |
35
|
|
|
|
|
|
|
use Config; |
36
|
|
|
|
|
|
|
use Alien::Google::GRPC; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
WriteMakefile( |
39
|
|
|
|
|
|
|
... |
40
|
|
|
|
|
|
|
CONFIGURE_REQUIRES => { |
41
|
|
|
|
|
|
|
'Alien::Google::GRPC' => '0', |
42
|
|
|
|
|
|
|
}, |
43
|
|
|
|
|
|
|
CCFLAGS => Alien::Google::GRPC->cflags . " $Config{ccflags}", |
44
|
|
|
|
|
|
|
LIBS => [ Alien::Google::GRPC->libs ], |
45
|
|
|
|
|
|
|
... |
46
|
|
|
|
|
|
|
); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
In your script or module: |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
use Alien::Google::GRPC; |
51
|
|
|
|
|
|
|
use Env qw( @PATH ); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
unshift @PATH, Alien::Google::GRPC->bin_dir; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=cut |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 DESCRIPTION |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
This distribution provides gRPC so that it can be used by other |
61
|
|
|
|
|
|
|
Perl distributions that are on CPAN. It does this by first trying to |
62
|
|
|
|
|
|
|
detect an existing install of gRPC on your system. If found it |
63
|
|
|
|
|
|
|
will use that. If it cannot be found, the source code will be downloaded |
64
|
|
|
|
|
|
|
from the internet and it will be installed in a private share location |
65
|
|
|
|
|
|
|
for the use of other modules. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=cut |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head2 Notes |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
This module is still in an early development stage. |
73
|
|
|
|
|
|
|
I have some additional modules I'll be releasing soon that depend on this module. |
74
|
|
|
|
|
|
|
It is possible some changes will be made to this module as the |
75
|
|
|
|
|
|
|
integration process proceeds. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
If a build is needed, it can be lengthy. A half hour or more to compile is not uncommon. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=cut |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
The following dependencies need to be installed in order for gRPC to build. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
$ [sudo] apt-get install build-essential |
87
|
|
|
|
|
|
|
$ [sudo] apt-get install curl |
88
|
|
|
|
|
|
|
$ [sudo] apt-get install git |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
The install information that this module is based on is available here: |
91
|
|
|
|
|
|
|
https://github.com/grpc/grpc/blob/master/INSTALL.md |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
At this time only Linux builds are supported. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=cut |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 AUTHOR |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Tom Stall |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=cut |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
This software is copyright (c) 2017 by Tom Stall. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
108
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=cut |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head1 SEE ALSO |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
L, L, L |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=cut |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
1; |