Skip to content

Commit cfe079c

Browse files
authored
Merge pull request #3356 from lukasvalle/master
example for use lib with IO:Path
2 parents 753c34f + 6db0c1d commit cfe079c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

doc/Language/modules.pod6

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,9 @@ zef --force install .
511511
X<|use lib>
512512
A user may have a collection of modules not found in the normal ecosystem,
513513
maintained by a module or package manager, but needed regularly. Instead of
514-
using the C<use lib> pragma one can use the C<RAKULIB> environment variable to
515-
point to module locations. For example:
514+
using the C<use lib> L<pragma|/language/pragmas#index-entry-lib__pragma> one
515+
can use the C<RAKULIB> environment variable to point to module locations.
516+
For example:
516517
517518
=for code :lang<shell>
518519
export RAKULIB=/path/to/my-modules,/path/to/more/modules
@@ -837,7 +838,8 @@ zef install ./your-module-folder
837838
=end code
838839
839840
Note that doing so precompiles and installs your module. If you make changes to
840-
the source, you'll need to re-install the module. (See C<use lib> pragma, C<-I>
841+
the source, you'll need to re-install the module.
842+
(See C<use lib> L<pragma|/language/pragmas#index-entry-lib__pragma>, C<-I>
841843
command line switch, or C<PERL6LIB> env variable, to include a path to your
842844
module source while developing it, so you don't have to install it at all).
843845

doc/Language/pragmas.pod6

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,13 @@ This pragma adds subdirectories to the library search
202202
path so that the interpreter can
203203
L<find the modules|/language/modules#Finding_modules>.
204204
205-
=for code :solo
205+
=begin code :solo
206206
use lib <lib /opt/lib /usr/local/lib>;
207207
208+
#or a mixed list of IO::Path and Str
209+
use lib ('.', '.'.IO, './lib'.IO);
210+
=end code
211+
208212
This will search the directories passed in a list. Please check
209213
L<the modules documentation|/language/modules#use> for more examples.
210214

0 commit comments

Comments
 (0)