Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / doc / sdk / perl / index.html.textile.liquid
1 ---
2 layout: default
3 navsection: sdk
4 navmenu: Perl
5 title: "Installation"
6 ...
7 {% comment %}
8 Copyright (C) The Arvados Authors. All rights reserved.
9
10 SPDX-License-Identifier: CC-BY-SA-3.0
11 {% endcomment %}
12
13 The Perl SDK provides a generic set of wrappers so you can make API calls easily.
14
15 This is a legacy SDK.  It is no longer used or maintained regularly.
16
17 h3. Installation
18
19 h4. Option 1: Install from distribution packages
20
21 First, "add the appropriate package repository for your distribution":{{ site.baseurl }}/install/install-manual-prerequisites.html#repos.
22
23 On Debian-based systems:
24
25 <notextile>
26 <pre><code>~$ <span class="userinput">sudo apt-get install libjson-perl libio-socket-ssl-perl libwww-perl libipc-system-simple-perl libarvados-perl</code>
27 </code></pre>
28 </notextile>
29
30 On Red Hat-based systems:
31
32 <notextile>
33 <pre><code>~$ <span class="userinput">sudo yum install perl-ExtUtils-MakeMaker perl-JSON perl-IO-Socket-SSL perl-Crypt-SSLeay perl-WWW-Curl libarvados-perl</code>
34 </code></pre>
35 </notextile>
36
37 h4. Option 2: Install from source
38
39 First, install dependencies from your distribution.  Refer to the package lists above, but don't install @libarvados-perl@.
40
41 Then run the following:
42
43 <notextile>
44 <pre><code>~$ <span class="userinput">git clone https://github.com/arvados/arvados.git</span>
45 ~$ <span class="userinput">cd arvados/sdk/perl</span>
46 ~$ <span class="userinput">perl Makefile.PL</span>
47 ~$ <span class="userinput">sudo make install</span>
48 </code></pre>
49 </notextile>
50
51 h3. Test installation
52
53 If the SDK is installed, @perl -MArvados -e ''@ should produce no errors.
54
55 If your @ARVADOS_API_HOST@ and @ARVADOS_API_TOKEN@ environment variables are set up correctly (see "api-tokens":{{site.baseurl}}/user/reference/api-tokens.html for details), the following test script should work:
56
57 <notextile>
58 <pre>~$ <code class="userinput">perl &lt;&lt;'EOF'
59 use Arvados;
60 my $arv = Arvados-&gt;new('apiVersion' => 'v1');
61 my $me = $arv-&gt;{'users'}-&gt;{'current'}-&gt;execute;
62 print ("arvados.v1.users.current.full_name = '", $me-&gt;{'full_name'}, "'\n");
63 EOF</code>
64 arvados.v1.users.current.full_name = 'Your Name'
65 </pre>
66 </notextile>