8 Copyright (C) The Arvados Authors. All rights reserved.
10 SPDX-License-Identifier: CC-BY-SA-3.0
13 The Perl SDK provides a generic set of wrappers so you can make API calls easily.
15 It should be treated as alpha/experimental. Currently, limitations include:
17 * No native Keep client.
22 h4. Option 1: Install from distribution packages
24 First, "add the appropriate package repository for your distribution":{{ site.baseurl }}/install/install-manual-prerequisites.html#repos.
26 On Debian-based systems:
29 <pre><code>~$ <span class="userinput">sudo apt-get install libjson-perl libio-socket-ssl-perl libwww-perl libipc-system-simple-perl libarvados-perl</code>
33 On Red Hat-based systems:
36 <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>
40 h4. Option 2: Install from source
42 First, install dependencies from your distribution. Refer to the package lists above, but don't install @libarvados-perl@.
44 Then run the following:
47 <pre><code>~$ <span class="userinput">git clone https://github.com/curoverse/arvados.git</span>
48 ~$ <span class="userinput">cd arvados/sdk/perl</span>
49 ~$ <span class="userinput">perl Makefile.PL</span>
50 ~$ <span class="userinput">sudo make install</span>
56 If the SDK is installed, @perl -MArvados -e ''@ should produce no errors.
58 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:
61 <pre>~$ <code class="userinput">perl <<'EOF'
63 my $arv = Arvados->new('apiVersion' => 'v1');
64 my $me = $arv->{'users'}->{'current'}->execute;
65 print ("arvados.v1.users.current.full_name = '", $me->{'full_name'}, "'\n");
67 arvados.v1.users.current.full_name = 'Your Name'