Skip to content

Commit cd32380

Browse files
committed
simpler explanation of $RAKULIB
also remove reference to $PERL6LIB.
1 parent 721b5f6 commit cd32380

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

doc/Language/5to6-nutshell.pod6

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,39 +1533,27 @@ shell injection vulnerabilities with such code.
15331533
15341534
=head2 Perl module library path
15351535
1536-
In Perl one of the environment variables to specify extra search paths for
1537-
Perl modules is C<PERL5LIB>.
1536+
Perl use C<PERLLIB> and C<PERL5LIB> to specify extra search paths for modules
1537+
and Both of them are ignored by Raku. Instead, you need to use X<C<RAKULIB>|RAKULIB>.
1538+
The directory separator also changed from ':' to ','.
15381539
1539-
=for code :lang<shell>
1540-
$ PERL5LIB="/some/module/lib" perl program.pl
1541-
1542-
In Raku this is similar, one merely needs to change a number! As you
1543-
probably guessed, you just need to use X<C<PERL6LIB>|PERL6LIB>:
1544-
1545-
=for code :lang<shell>
1546-
$ PERL6LIB="/some/module/lib" raku program.p6
1547-
1548-
In Perl one uses the ':' (colon) as a directory separator for C<PERL5LIB>, but
1549-
in Raku one uses the ',' (comma). For example:
1540+
So the equivalent of
15501541
15511542
=for code :lang<shell>
15521543
$ export PERL5LIB=/module/dir1:/module/dir2;
15531544
1554-
but
1545+
is
15551546
15561547
=for code :lang<shell>
1557-
$ export PERL6LIB=/module/dir1,/module/dir2;
1558-
1559-
(Raku does not recognize either the C<PERL5LIB> or the older Perl environment
1560-
variable C<PERLLIB>.)
1548+
$ export RAKULIB=/module/dir1,/module/dir2;
15611549
1562-
As with Perl, if you don't specify C<PERL6LIB>, you need to specify the
1550+
As with Perl, if you don't specify C<RAKULIB>, you need to specify the
15631551
library path within the program via the C<use lib> pragma:
15641552
15651553
=for code :lang<perl>
15661554
use lib '/some/module/lib'
15671555
1568-
Note that C<PERL6LIB> is more of a developer convenience in Raku (as
1556+
Note that C<RAKULIB> is more of a developer convenience in Raku (as
15691557
opposed to the equivalent usage of C<PERL5LIB> in Perl) and shouldn't be
15701558
used by module consumers as it could be removed in the future. This is
15711559
because Raku's module loading isn't directly compatible with operating

0 commit comments

Comments
 (0)