Skip to content

Commit b6789ed

Browse files
committed
perl lib install update
1 parent 21fd8b9 commit b6789ed

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

src/content/docs/guide/perllib.mdx

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ This is ideal for environments where you cannot modify system Perl without root
2828

2929
You can substitute this path to any location you want (`~` or even `$SCRATCH`) .
3030

31+
3132
2. **Set up the environment to install Perl modules locally:**
3233

3334
```bash frame="none"
@@ -50,9 +51,17 @@ This is ideal for environments where you cannot modify system Perl without root
5051
source /depot/gcore/localperl/env.sh
5152
```
5253

54+
<Aside type="note">
55+
You can check which Perl is in use and where it looks for libraries by running `which perl` and `perl -V` commands
56+
Make sure it points to `/usr/bin/perl` and includes `/depot/gcore/localperl/lib/perl5` in `@INC` after activating your environment.
57+
</Aside>
5358

5459
3. **Install `cpanm` (Perl module installer) into the custom location:**
5560

61+
<Aside type="caution">
62+
Make sure you've already run `source /depot/gcore/localperl/env.sh` before installing modules with `cpanm`, or they will be installed in the wrong location.
63+
</Aside>
64+
5665
```bash frame="none"
5766
curl -L https://cpanmin.us | perl - --local-lib=/depot/gcore/localperl App::cpanminus
5867
```
@@ -75,12 +84,18 @@ This is ideal for environments where you cannot modify system Perl without root
7584
You can add more modules as needed.
7685

7786

78-
6. **(Optional) Automatically load your environment in future sessions:**
87+
5. **(Optional) Automatically load your environment in future sessions:**
7988

8089
```bash frame="none"
8190
echo 'source /depot/gcore/localperl/env.sh' >> ~/.bashrc
8291
```
8392

93+
If you prefer not to modify your `~/.bashrc`, you can manually source the environment script each time you start a new session.
94+
95+
<Aside type="caution">
96+
Remember to run `source /depot/gcore/localperl/env.sh` in any new shell before running scripts that depend on these local modules.
97+
</Aside>
98+
8499
</Steps>
85100

86101

@@ -104,3 +119,19 @@ perl test_perl_modules.pl
104119
```
105120
If you see the message "Local Perl modules are working!", your installation is successful.
106121

122+
123+
## FAQs
124+
125+
<details>
126+
<summary>1. How can I get a list of all installed `perl` modules? [click to see answer]</summary>
127+
128+
You can use the following command to list all installed Perl modules:
129+
130+
```bash frame="none"
131+
perldoc perllocal
132+
```
133+
or
134+
```bash frame="none"
135+
find /depot/gcore/localperl/lib/perl5 -name '*.pm'
136+
```
137+
</details>

0 commit comments

Comments
 (0)