-
Notifications
You must be signed in to change notification settings - Fork 217
/
README
168 lines (119 loc) · 6.21 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
NAME
App::perlbrew - Manage perl installations in your $HOME
SYNOPSIS
# Installation
curl -L https://install.perlbrew.pl | bash
# Initialize
perlbrew init
# See what is available
perlbrew available
# Install some Perls
perlbrew install 5.32.1
perlbrew install perl-5.28.3
perlbrew install perl-5.33.6
# See what were installed
perlbrew list
# Swith to an installation and set it as default
perlbrew switch perl-5.32.1
# Temporarily use another version only in current shell.
perlbrew use perl-5.28.3
perl -v
# Turn it off and go back to the system perl.
perlbrew off
# Turn it back on with 'switch', or 'use'
perlbrew switch perl-5.32.1
perlbrew use perl-5.32.1
# Exec something with all perlbrew-ed perls
perlbrew exec -- perl -E 'say $]'
DESCRIPTION
perlbrew is a program to automate the building and installation of perl
in an easy way. It provides multiple isolated perl environments, and a
mechanism for you to switch between them.
Everything are installed unter ~/perl5/perlbrew. You then need to
include a bashrc/cshrc provided by perlbrew to tweak the PATH for you.
You then can benefit from not having to run sudo commands to install
cpan modules because those are installed inside your HOME too.
For the documentation of perlbrew usage see perlbrew command on
MetaCPAN <https://metacpan.org/>, or by running perlbrew help, or by
visiting perlbrew's official website <https://perlbrew.pl/>. The
following documentation features the API of App::perlbrew module, and
may not be remotely close to what your want to read.
INSTALLATION
It is the simplest to use the perlbrew installer, just paste this
statement to your terminal:
curl -L https://install.perlbrew.pl | bash
Or this one, if you have fetch (default on FreeBSD):
fetch -o- https://install.perlbrew.pl | sh
After that, perlbrew installs itself to ~/perl5/perlbrew/bin, and you
should follow the instruction on screen to modify your shell rc file to
put it in your PATH.
The installed perlbrew command is a standalone executable that can be
run with system perl. The minimum required version of system perl is
5.8.0, which should be good enough for most of the OSes these days.
A fat-packed version of patchperl is also installed to
~/perl5/perlbrew/bin, which is required to build old perls.
The directory ~/perl5/perlbrew will contain all install perl
executables, libraries, documentations, lib, site_libs. In the
documentation, that directory is referred as perlbrew root. If you need
to set it to somewhere else because, say, your HOME has limited quota,
you can do that by setting PERLBREW_ROOT environment variable before
running the installer:
export PERLBREW_ROOT=/opt/perl5
curl -L https://install.perlbrew.pl | bash
As a result, different users on the same machine can all share the same
perlbrew root directory (although only original user that made the
installation would have the permission to perform perl installations.)
If you need to install perlbrew using a Perl that isn't either
/usr/bin/perl or /usr/local/bin/perl, set and export the environment
variable PERLBREW_SYSTEM_PERL and then install as described above. Note
that you must not use a perlbrew-managed perl.
You may also install perlbrew from CPAN:
cpan App::perlbrew
In this case, the perlbrew command is installed as /usr/bin/perlbrew or
/usr/local/bin/perlbrew or others, depending on the location of your
system perl installation.
Please make sure not to run this with one of the perls brewed with
perlbrew. It's the best to turn perlbrew off before you run that, if
you're upgrading.
perlbrew off
cpan App::perlbrew
You should always use system cpan (like /usr/bin/cpan) to install
App::perlbrew because it will be installed under a system PATH like
/usr/bin, which is not affected by perlbrew switch or use command.
The self-upgrade command will not upgrade the perlbrew installed by
cpan command, but it is also easy to upgrade perlbrew by running cpan
App::perlbrew again.
PROJECT DEVELOPMENT
perlbrew project <https://perlbrew.pl/> uses github
https://github.com/gugod/App-perlbrew/issues for issue tracking. Issues
sent to these two systems will eventually be reviewed and handled. To
participate, you need a github account.
Please briefly read the short instructions about how to get your work
released to CPAN:
https://github.com/gugod/App-perlbrew/blob/develop/CONTRIBUTING.md
AUTHOR
Kang-min Liu <[email protected]>
COPYRIGHT
Copyright (c) 2023 Kang-min Liu <[email protected]>.
LICENCE
The MIT License
DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE
TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.