8784: Fix test for latest firefox.
[arvados.git] / doc / sdk / perl / index.html.textile.liquid
1 ---
2 layout: default
3 navsection: sdk
4 navmenu: Perl
5 title: "Installation"
6 ...
7
8 The Perl SDK provides a generic set of wrappers so you can make API calls easily.
9
10 It should be treated as alpha/experimental. Currently, limitations include:
11 * Verbose syntax.
12 * No native Keep client.
13 * No CPAN package.
14
15 h3. Installation
16
17 h4. Option 1: Install from distribution packages
18
19 First, "add the appropriate package repository for your distribution":{{ site.baseurl }}/install/install-manual-prerequisites.html#repos.
20
21 On Debian-based systems:
22
23 <notextile>
24 <pre><code>~$ <span class="userinput">sudo apt-get install libjson-perl libio-socket-ssl-perl libwww-perl libipc-system-simple-perl libarvados-perl</code>
25 </code></pre>
26 </notextile>
27
28 On Red Hat-based systems:
29
30 <notextile>
31 <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>
32 </code></pre>
33 </notextile>
34
35 h4. Option 2: Install from source
36
37 First, install dependencies from your distribution.  Refer to the package lists above, but don't install @libarvados-perl@.
38
39 Then run the following:
40
41 <notextile>
42 <pre><code>~$ <span class="userinput">git clone https://github.com/curoverse/arvados.git</span>
43 ~$ <span class="userinput">cd arvados/sdk/perl</span>
44 ~$ <span class="userinput">perl Makefile.PL</span>
45 ~$ <span class="userinput">sudo make install</span>
46 </code></pre>
47 </notextile>
48
49 h3. Test installation
50
51 If the SDK is installed, @perl -MArvados -e ''@ should produce no errors.
52
53 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:
54
55 <notextile>
56 <pre>~$ <code class="userinput">perl &lt;&lt;'EOF'
57 use Arvados;
58 my $arv = Arvados-&gt;new('apiVersion' => 'v1');
59 my $me = $arv-&gt;{'users'}-&gt;{'current'}-&gt;execute;
60 print ("arvados.v1.users.current.full_name = '", $me-&gt;{'full_name'}, "'\n");
61 EOF</code>
62 arvados.v1.users.current.full_name = 'Your Name'
63 </pre>
64 </notextile>