You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-16Lines changed: 38 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,25 +49,47 @@ This repository provides a hermetic [Strawberry Perl](https://strawberryperl.com
49
49
50
50
## Using Perl Modules
51
51
52
-
This is the first stab at getting a more mature set of Perl rules for Bazel. Currently, it is a manual process and, hopefully, it will be a map for automation later on.
52
+
Perl modules from [CPAN](https://www.cpan.org/) can be generated using the `cpan_compiler` rule in
53
+
conjunction with the `cpan` module extension.
53
54
54
55
### Current Steps
55
56
56
-
* Manually download the module that you want to use.
57
-
* Add the actual files that you need to your repository.
58
-
* Highly recommended that you place the files in the directory structure that each Perl file is unpacked into (you may need to run `perl Makefile.PL; make` to see the final paths)
59
-
* Recommended to create a 'cpan' directory and place the files (in their required path) there.
60
-
* Test::Mock::Simple does **NOT** follow this pattern as it is being used as a practical example - please see 'Simple Pure Perl Example' section.
61
-
* Add the new module's information to the BUILD file in the root directory of all your modules.
62
-
* the target in the `deps` attribute
63
-
* At this time compiled files (result of XS) will be put in the `srcs` attribute
64
-
* the directory where the module lives in the `env` attribute for the `PERL5LIB` variable
65
-
66
-
#### Dependencies
67
-
68
-
The process needs to be repeated for any dependencies that the module needs.
69
-
70
-
Eventually, this should be an automated process.
57
+
1. Create a `cpanfile` per the [Carton](https://metacpan.org/pod/Carton) documentation.
58
+
2. Create an empty `*.json` will need to be created for Bazel to use a lockfile (e.g. `cpanfile.snapshot.lock.json`)
0 commit comments