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 This is a legacy SDK. It is no longer used or maintained regularly.
19 h4. Option 1: Install from distribution packages
21 First, "add the appropriate package repository for your distribution":{{ site.baseurl }}/install/install-manual-prerequisites.html#repos.
23 On Debian-based systems:
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>
30 On Red Hat-based systems:
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>
37 h4. Option 2: Install from source
39 First, install dependencies from your distribution. Refer to the package lists above, but don't install @libarvados-perl@.
41 Then run the following:
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>
53 If the SDK is installed, @perl -MArvados -e ''@ should produce no errors.
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:
58 <pre>~$ <code class="userinput">perl <<'EOF'
60 my $arv = Arvados->new('apiVersion' => 'v1');
61 my $me = $arv->{'users'}->{'current'}->execute;
62 print ("arvados.v1.users.current.full_name = '", $me->{'full_name'}, "'\n");
64 arvados.v1.users.current.full_name = 'Your Name'