We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Perl sanity check fails if prefix contains the string "perl"
When installing `Perl-5.28.1-GCCcore-8.2.0.eb` with EB 3.9.0 (also happens with EB 3.8.1) the sanity check fails with following error: 
```
== FAILED: Installation ended unsuccessfully (build directory: /software/build-tmp/Perl/5.28.1/GCCcore-8.2.0): build failed (first 300 chars): Sanity check failed: no (non-empty) directory found at 'lib/perl5/5.28.1' in /software/2019/software/perl/5.28.1-gcccore-8.2.0
== Results of the build can be found in the log file(s) /tmp/eb-2_vi5K/easybuild-Perl-5.28.1-20190426.135243.FZqzX.log
ERROR: Build of /software/system/easyconfigs/easybuild/easyconfigs/p/Perl/Perl-5.28.1-GCCcore-8.2.0.eb failed (err: "build failed (first 300 chars): Sanity check failed: no (non-empty) directory found at 'lib/perl5/5.28.1' in /software/2019/software/perl/5.28.1-gcccore-8.2.0")
```
The install folder misses the `perl5` folder:
```
[easybuild@clip-login-1 ~]$ ls -la /software/2019/software/perl/5.28.1-gcccore-8.2.0
total 28
drwxrwxr-x. 5 easybuild easybuild  4096 Apr 26 14:25 .
drwxrwxr-x. 3 easybuild easybuild  4096 Apr 26 14:25 ..
drwxr-xr-x. 2 easybuild easybuild 12288 Apr 26 14:35 bin
drwxr-xr-x. 4 easybuild easybuild  4096 Apr 26 14:25 lib
drwxr-xr-x. 4 easybuild easybuild  4096 Apr 26 14:25 man
```
The build log indicatges that botih `site_perl` as well as the `5.28.1` folder are directly installed into the `lib` folder and not into `perl5`:

```
Installation prefix to use for add-on modules and utilities? (~name ok) [/software/2019/software/perl/5.28.1-gcccore-8.2.0]  

The installation process will create a directory for
site-specific extensions and modules.  Most users find it convenient
to place all site-specific files in this directory rather than in the
main distribution directory.

Pathname for the site-specific library files? (~name ok) [/software/2019/software/perl/5.28.1-gcccore-8.2.0/lib/site_perl/5.28.1]  
```
According to https://metacpan.org/pod/distribution/perl/INSTALL#Common-Configure-options this seems to be expected behavior:

> If your prefix contains the string "perl", then the suggested directory structure is simplified. For example, if you use prefix=/opt/perl, then Configure will suggest /opt/perl/lib instead of /opt/perl/lib/perl5/

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `easybuild/easyblocks/p/perl.py`
Content:
```
1 ##
2 # Copyright 2009-2019 Ghent University
3 #
4 # This file is part of EasyBuild,
5 # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
6 # with support of Ghent University (http://ugent.be/hpc),
7 # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
8 # Flemish Research Foundation (FWO) (http://www.fwo.be/en)
9 # and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
10 #
11 # https://github.com/easybuilders/easybuild
12 #
13 # EasyBuild is free software: you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by
15 # the Free Software Foundation v2.
16 #
17 # EasyBuild is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 # GNU General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License
23 # along with EasyBuild.  If not, see <http://www.gnu.org/licenses/>.
24 ##
25 """
26 EasyBuild support for Perl, implemented as an easyblock
27 
28 @author: Jens Timmerman (Ghent University)
29 @author: Kenneth Hoste (Ghent University)
30 """
31 import os
32 
33 from easybuild.easyblocks.generic.configuremake import ConfigureMake
34 from easybuild.framework.easyconfig import CUSTOM
35 from easybuild.tools.run import run_cmd
36 
37 # perldoc -lm seems to be the safest way to test if a module is available, based on exit code
38 EXTS_FILTER_PERL_MODULES = ("perldoc -lm %(ext_name)s ", "")
39 
40 
41 class EB_Perl(ConfigureMake):
42     """Support for building and installing Perl."""
43 
44     @staticmethod
45     def extra_options():
46         """Add extra config options specific to Perl."""
47         extra_vars = {
48             'use_perl_threads': [True, "Enable use of internal Perl threads via -Dusethreads configure option", CUSTOM],
49         }
50         return ConfigureMake.extra_options(extra_vars)
51 
52     def configure_step(self):
53         """
54         Configure Perl build: run ./Configure instead of ./configure with some different options
55         """
56         configopts = [
57             self.cfg['configopts'],
58             '-Dcc="{0}"'.format(os.getenv('CC')),
59             '-Dccflags="{0}"'.format(os.getenv('CFLAGS')),
60             '-Dinc_version_list=none',
61             '-Dprefix=%(installdir)s',
62             # guarantee that scripts are installed in /bin in the installation directory (and not in a guessed path)
63             # see https://github.com/easybuilders/easybuild-easyblocks/issues/1659
64             '-Dinstallscript=%(installdir)s/bin',
65             '-Dscriptdir=%(installdir)s/bin',
66             '-Dscriptdirexp=%(installdir)s/bin',
67         ]
68         if self.cfg['use_perl_threads']:
69             configopts.append('-Dusethreads')
70 
71         configopts = (' '.join(configopts)) % {'installdir': self.installdir}
72 
73         cmd = './Configure -de %s' % configopts
74         run_cmd(cmd, log_all=True, simple=True)
75 
76     def test_step(self):
77         """Test Perl build via 'make test'."""
78         # allow escaping with runtest = False
79         if self.cfg['runtest'] is None or self.cfg['runtest']:
80             if isinstance(self.cfg['runtest'], basestring):
81                 cmd = "make %s" % self.cfg['runtest']
82             else:
83                 cmd = "make test"
84 
85             # specify locale to be used, to avoid that a handful of tests fail
86             cmd = "export LC_ALL=C && %s" % cmd
87 
88             run_cmd(cmd, log_all=False, log_ok=False, simple=False)
89 
90     def prepare_for_extensions(self):
91         """
92         Set default class and filter for Perl modules
93         """
94         # build and install additional modules with PerlModule easyblock
95         self.cfg['exts_defaultclass'] = "PerlModule"
96         self.cfg['exts_filter'] = EXTS_FILTER_PERL_MODULES
97 
98     def sanity_check_step(self):
99         """Custom sanity check for Perl."""
100         majver = self.version.split('.')[0]
101         custom_paths = {
102             'files': [os.path.join('bin', x) for x in ['perl', 'perldoc']],
103             'dirs': ['lib/perl%s/%s' % (majver, self.version), 'man']
104         }
105         super(EB_Perl, self).sanity_check_step(custom_paths=custom_paths)
106 
107 
108 def get_major_perl_version():
109     """"
110     Returns the major verson of the perl binary in the current path
111     """
112     cmd = "perl -MConfig -e 'print $Config::Config{PERL_API_REVISION}'"
113     (perlmajver, _) = run_cmd(cmd, log_all=True, log_output=True, simple=False)
114     return perlmajver
115 
116 
117 def get_site_suffix(tag):
118     """
119     Returns the suffix for site* (e.g. sitearch, sitelib)
120     this will look something like /lib/perl5/site_perl/5.16.3/x86_64-linux-thread-multi
121     so, e.g. sitearch without site prefix
122 
123     @tag: site tag to use, e.g. 'sitearch', 'sitelib'
124     """
125     perl_cmd = 'my $a = $Config::Config{"%s"}; $a =~ s/($Config::Config{"siteprefix"})//; print $a' % tag
126     cmd = "perl -MConfig -e '%s'" % perl_cmd
127     (sitesuffix, _) = run_cmd(cmd, log_all=True, log_output=True, simple=False)
128     # obtained value usually contains leading '/', so strip it off
129     return sitesuffix.lstrip(os.path.sep)
130
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/easybuild/easyblocks/p/perl.py b/easybuild/easyblocks/p/perl.py
--- a/easybuild/easyblocks/p/perl.py
+++ b/easybuild/easyblocks/p/perl.py
@@ -53,6 +53,7 @@
         """
         Configure Perl build: run ./Configure instead of ./configure with some different options
         """
+        majver = self.version.split('.')[0]
         configopts = [
             self.cfg['configopts'],
             '-Dcc="{0}"'.format(os.getenv('CC')),
@@ -64,6 +65,9 @@
             '-Dinstallscript=%(installdir)s/bin',
             '-Dscriptdir=%(installdir)s/bin',
             '-Dscriptdirexp=%(installdir)s/bin',
+            # guarantee that the install directory has the form lib/perlX/
+            # see https://github.com/easybuilders/easybuild-easyblocks/issues/1700
+            "-Dinstallstyle='lib/perl%s'" % majver,
         ]
         if self.cfg['use_perl_threads']:
             configopts.append('-Dusethreads')

{"golden_diff": "diff --git a/easybuild/easyblocks/p/perl.py b/easybuild/easyblocks/p/perl.py\n--- a/easybuild/easyblocks/p/perl.py\n+++ b/easybuild/easyblocks/p/perl.py\n@@ -53,6 +53,7 @@\n         \"\"\"\n         Configure Perl build: run ./Configure instead of ./configure with some different options\n         \"\"\"\n+        majver = self.version.split('.')[0]\n         configopts = [\n             self.cfg['configopts'],\n             '-Dcc=\"{0}\"'.format(os.getenv('CC')),\n@@ -64,6 +65,9 @@\n             '-Dinstallscript=%(installdir)s/bin',\n             '-Dscriptdir=%(installdir)s/bin',\n             '-Dscriptdirexp=%(installdir)s/bin',\n+            # guarantee that the install directory has the form lib/perlX/\n+            # see https://github.com/easybuilders/easybuild-easyblocks/issues/1700\n+            \"-Dinstallstyle='lib/perl%s'\" % majver,\n         ]\n         if self.cfg['use_perl_threads']:\n             configopts.append('-Dusethreads')\n", "issue": "Perl sanity check fails if prefix contains the string \"perl\"\nWhen installing `Perl-5.28.1-GCCcore-8.2.0.eb` with EB 3.9.0 (also happens with EB 3.8.1) the sanity check fails with following error: \r\n```\r\n== FAILED: Installation ended unsuccessfully (build directory: /software/build-tmp/Perl/5.28.1/GCCcore-8.2.0): build failed (first 300 chars): Sanity check failed: no (non-empty) directory found at 'lib/perl5/5.28.1' in /software/2019/software/perl/5.28.1-gcccore-8.2.0\r\n== Results of the build can be found in the log file(s) /tmp/eb-2_vi5K/easybuild-Perl-5.28.1-20190426.135243.FZqzX.log\r\nERROR: Build of /software/system/easyconfigs/easybuild/easyconfigs/p/Perl/Perl-5.28.1-GCCcore-8.2.0.eb failed (err: \"build failed (first 300 chars): Sanity check failed: no (non-empty) directory found at 'lib/perl5/5.28.1' in /software/2019/software/perl/5.28.1-gcccore-8.2.0\")\r\n```\r\nThe install folder misses the `perl5` folder:\r\n```\r\n[easybuild@clip-login-1 ~]$ ls -la /software/2019/software/perl/5.28.1-gcccore-8.2.0\r\ntotal 28\r\ndrwxrwxr-x. 5 easybuild easybuild  4096 Apr 26 14:25 .\r\ndrwxrwxr-x. 3 easybuild easybuild  4096 Apr 26 14:25 ..\r\ndrwxr-xr-x. 2 easybuild easybuild 12288 Apr 26 14:35 bin\r\ndrwxr-xr-x. 4 easybuild easybuild  4096 Apr 26 14:25 lib\r\ndrwxr-xr-x. 4 easybuild easybuild  4096 Apr 26 14:25 man\r\n```\r\nThe build log indicatges that botih `site_perl` as well as the `5.28.1` folder are directly installed into the `lib` folder and not into `perl5`:\r\n\r\n```\r\nInstallation prefix to use for add-on modules and utilities? (~name ok) [/software/2019/software/perl/5.28.1-gcccore-8.2.0]  \r\n\r\nThe installation process will create a directory for\r\nsite-specific extensions and modules.  Most users find it convenient\r\nto place all site-specific files in this directory rather than in the\r\nmain distribution directory.\r\n\r\nPathname for the site-specific library files? (~name ok) [/software/2019/software/perl/5.28.1-gcccore-8.2.0/lib/site_perl/5.28.1]  \r\n```\r\nAccording to https://metacpan.org/pod/distribution/perl/INSTALL#Common-Configure-options this seems to be expected behavior:\r\n\r\n> If your prefix contains the string \"perl\", then the suggested directory structure is simplified. For example, if you use prefix=/opt/perl, then Configure will suggest /opt/perl/lib instead of /opt/perl/lib/perl5/\n", "before_files": [{"content": "##\n# Copyright 2009-2019 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# Flemish Research Foundation (FWO) (http://www.fwo.be/en)\n# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).\n#\n# https://github.com/easybuilders/easybuild\n#\n# EasyBuild is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation v2.\n#\n# EasyBuild is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with EasyBuild.  If not, see <http://www.gnu.org/licenses/>.\n##\n\"\"\"\nEasyBuild support for Perl, implemented as an easyblock\n\n@author: Jens Timmerman (Ghent University)\n@author: Kenneth Hoste (Ghent University)\n\"\"\"\nimport os\n\nfrom easybuild.easyblocks.generic.configuremake import ConfigureMake\nfrom easybuild.framework.easyconfig import CUSTOM\nfrom easybuild.tools.run import run_cmd\n\n# perldoc -lm seems to be the safest way to test if a module is available, based on exit code\nEXTS_FILTER_PERL_MODULES = (\"perldoc -lm %(ext_name)s \", \"\")\n\n\nclass EB_Perl(ConfigureMake):\n    \"\"\"Support for building and installing Perl.\"\"\"\n\n    @staticmethod\n    def extra_options():\n        \"\"\"Add extra config options specific to Perl.\"\"\"\n        extra_vars = {\n            'use_perl_threads': [True, \"Enable use of internal Perl threads via -Dusethreads configure option\", CUSTOM],\n        }\n        return ConfigureMake.extra_options(extra_vars)\n\n    def configure_step(self):\n        \"\"\"\n        Configure Perl build: run ./Configure instead of ./configure with some different options\n        \"\"\"\n        configopts = [\n            self.cfg['configopts'],\n            '-Dcc=\"{0}\"'.format(os.getenv('CC')),\n            '-Dccflags=\"{0}\"'.format(os.getenv('CFLAGS')),\n            '-Dinc_version_list=none',\n            '-Dprefix=%(installdir)s',\n            # guarantee that scripts are installed in /bin in the installation directory (and not in a guessed path)\n            # see https://github.com/easybuilders/easybuild-easyblocks/issues/1659\n            '-Dinstallscript=%(installdir)s/bin',\n            '-Dscriptdir=%(installdir)s/bin',\n            '-Dscriptdirexp=%(installdir)s/bin',\n        ]\n        if self.cfg['use_perl_threads']:\n            configopts.append('-Dusethreads')\n\n        configopts = (' '.join(configopts)) % {'installdir': self.installdir}\n\n        cmd = './Configure -de %s' % configopts\n        run_cmd(cmd, log_all=True, simple=True)\n\n    def test_step(self):\n        \"\"\"Test Perl build via 'make test'.\"\"\"\n        # allow escaping with runtest = False\n        if self.cfg['runtest'] is None or self.cfg['runtest']:\n            if isinstance(self.cfg['runtest'], basestring):\n                cmd = \"make %s\" % self.cfg['runtest']\n            else:\n                cmd = \"make test\"\n\n            # specify locale to be used, to avoid that a handful of tests fail\n            cmd = \"export LC_ALL=C && %s\" % cmd\n\n            run_cmd(cmd, log_all=False, log_ok=False, simple=False)\n\n    def prepare_for_extensions(self):\n        \"\"\"\n        Set default class and filter for Perl modules\n        \"\"\"\n        # build and install additional modules with PerlModule easyblock\n        self.cfg['exts_defaultclass'] = \"PerlModule\"\n        self.cfg['exts_filter'] = EXTS_FILTER_PERL_MODULES\n\n    def sanity_check_step(self):\n        \"\"\"Custom sanity check for Perl.\"\"\"\n        majver = self.version.split('.')[0]\n        custom_paths = {\n            'files': [os.path.join('bin', x) for x in ['perl', 'perldoc']],\n            'dirs': ['lib/perl%s/%s' % (majver, self.version), 'man']\n        }\n        super(EB_Perl, self).sanity_check_step(custom_paths=custom_paths)\n\n\ndef get_major_perl_version():\n    \"\"\"\"\n    Returns the major verson of the perl binary in the current path\n    \"\"\"\n    cmd = \"perl -MConfig -e 'print $Config::Config{PERL_API_REVISION}'\"\n    (perlmajver, _) = run_cmd(cmd, log_all=True, log_output=True, simple=False)\n    return perlmajver\n\n\ndef get_site_suffix(tag):\n    \"\"\"\n    Returns the suffix for site* (e.g. sitearch, sitelib)\n    this will look something like /lib/perl5/site_perl/5.16.3/x86_64-linux-thread-multi\n    so, e.g. sitearch without site prefix\n\n    @tag: site tag to use, e.g. 'sitearch', 'sitelib'\n    \"\"\"\n    perl_cmd = 'my $a = $Config::Config{\"%s\"}; $a =~ s/($Config::Config{\"siteprefix\"})//; print $a' % tag\n    cmd = \"perl -MConfig -e '%s'\" % perl_cmd\n    (sitesuffix, _) = run_cmd(cmd, log_all=True, log_output=True, simple=False)\n    # obtained value usually contains leading '/', so strip it off\n    return sitesuffix.lstrip(os.path.sep)\n", "path": "easybuild/easyblocks/p/perl.py"}], "after_files": [{"content": "##\n# Copyright 2009-2019 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# Flemish Research Foundation (FWO) (http://www.fwo.be/en)\n# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).\n#\n# https://github.com/easybuilders/easybuild\n#\n# EasyBuild is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation v2.\n#\n# EasyBuild is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with EasyBuild.  If not, see <http://www.gnu.org/licenses/>.\n##\n\"\"\"\nEasyBuild support for Perl, implemented as an easyblock\n\n@author: Jens Timmerman (Ghent University)\n@author: Kenneth Hoste (Ghent University)\n\"\"\"\nimport os\n\nfrom easybuild.easyblocks.generic.configuremake import ConfigureMake\nfrom easybuild.framework.easyconfig import CUSTOM\nfrom easybuild.tools.run import run_cmd\n\n# perldoc -lm seems to be the safest way to test if a module is available, based on exit code\nEXTS_FILTER_PERL_MODULES = (\"perldoc -lm %(ext_name)s \", \"\")\n\n\nclass EB_Perl(ConfigureMake):\n    \"\"\"Support for building and installing Perl.\"\"\"\n\n    @staticmethod\n    def extra_options():\n        \"\"\"Add extra config options specific to Perl.\"\"\"\n        extra_vars = {\n            'use_perl_threads': [True, \"Enable use of internal Perl threads via -Dusethreads configure option\", CUSTOM],\n        }\n        return ConfigureMake.extra_options(extra_vars)\n\n    def configure_step(self):\n        \"\"\"\n        Configure Perl build: run ./Configure instead of ./configure with some different options\n        \"\"\"\n        majver = self.version.split('.')[0]\n        configopts = [\n            self.cfg['configopts'],\n            '-Dcc=\"{0}\"'.format(os.getenv('CC')),\n            '-Dccflags=\"{0}\"'.format(os.getenv('CFLAGS')),\n            '-Dinc_version_list=none',\n            '-Dprefix=%(installdir)s',\n            # guarantee that scripts are installed in /bin in the installation directory (and not in a guessed path)\n            # see https://github.com/easybuilders/easybuild-easyblocks/issues/1659\n            '-Dinstallscript=%(installdir)s/bin',\n            '-Dscriptdir=%(installdir)s/bin',\n            '-Dscriptdirexp=%(installdir)s/bin',\n            # guarantee that the install directory has the form lib/perlX/\n            # see https://github.com/easybuilders/easybuild-easyblocks/issues/1700\n            \"-Dinstallstyle='lib/perl%s'\" % majver,\n        ]\n        if self.cfg['use_perl_threads']:\n            configopts.append('-Dusethreads')\n\n        configopts = (' '.join(configopts)) % {'installdir': self.installdir}\n\n        cmd = './Configure -de %s' % configopts\n        run_cmd(cmd, log_all=True, simple=True)\n\n    def test_step(self):\n        \"\"\"Test Perl build via 'make test'.\"\"\"\n        # allow escaping with runtest = False\n        if self.cfg['runtest'] is None or self.cfg['runtest']:\n            if isinstance(self.cfg['runtest'], basestring):\n                cmd = \"make %s\" % self.cfg['runtest']\n            else:\n                cmd = \"make test\"\n\n            # specify locale to be used, to avoid that a handful of tests fail\n            cmd = \"export LC_ALL=C && %s\" % cmd\n\n            run_cmd(cmd, log_all=False, log_ok=False, simple=False)\n\n    def prepare_for_extensions(self):\n        \"\"\"\n        Set default class and filter for Perl modules\n        \"\"\"\n        # build and install additional modules with PerlModule easyblock\n        self.cfg['exts_defaultclass'] = \"PerlModule\"\n        self.cfg['exts_filter'] = EXTS_FILTER_PERL_MODULES\n\n    def sanity_check_step(self):\n        \"\"\"Custom sanity check for Perl.\"\"\"\n        majver = self.version.split('.')[0]\n        custom_paths = {\n            'files': [os.path.join('bin', x) for x in ['perl', 'perldoc']],\n            'dirs': ['lib/perl%s/%s' % (majver, self.version), 'man']\n        }\n        super(EB_Perl, self).sanity_check_step(custom_paths=custom_paths)\n\n\ndef get_major_perl_version():\n    \"\"\"\"\n    Returns the major verson of the perl binary in the current path\n    \"\"\"\n    cmd = \"perl -MConfig -e 'print $Config::Config{PERL_API_REVISION}'\"\n    (perlmajver, _) = run_cmd(cmd, log_all=True, log_output=True, simple=False)\n    return perlmajver\n\n\ndef get_site_suffix(tag):\n    \"\"\"\n    Returns the suffix for site* (e.g. sitearch, sitelib)\n    this will look something like /lib/perl5/site_perl/5.16.3/x86_64-linux-thread-multi\n    so, e.g. sitearch without site prefix\n\n    @tag: site tag to use, e.g. 'sitearch', 'sitelib'\n    \"\"\"\n    perl_cmd = 'my $a = $Config::Config{\"%s\"}; $a =~ s/($Config::Config{\"siteprefix\"})//; print $a' % tag\n    cmd = \"perl -MConfig -e '%s'\" % perl_cmd\n    (sitesuffix, _) = run_cmd(cmd, log_all=True, log_output=True, simple=False)\n    # obtained value usually contains leading '/', so strip it off\n    return sitesuffix.lstrip(os.path.sep)\n", "path": "easybuild/easyblocks/p/perl.py"}]}