-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
199 lines (129 loc) · 5.42 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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
NAME
App::Virtualenv - Perl virtual environment
VERSION
version 2.07
SYNOPSIS
#!/bin/sh
perl -MApp::Virtualenv -erun -- environment_path
DESCRIPTION
App::Virtualenv is a Perl package to create isolated Perl virtual
environments, like Python virtual environment.
See also: virtualenv.pl
<https://metacpan.org/pod/distribution/App-Virtualenv/lib/App/Virtualenv
/virtualenv.pl>
Functions
sh(@args)
runs shell program defined in SHELL environment variable, otherwise
/bin/sh
@args: *arguments of shell program*
return value: *exit code of shell program*
perl(@args)
runs Perl interpreter
@args: *arguments of Perl interpreter*
return value: *exit code of Perl interpreter*
activate($virtualenv_path)
activates Perl virtual environment
$virtualenv_path: *virtual environment path*
return value: *virtual environment path if success, otherwise undef*
deactivate($nondestructive)
deactivates Perl virtual environment
$nondestructive: *leaves envionment variables as it is, unless there are
old envionment variables*
return value: *always 1*
create($virtualenv_path, $empty)
creates Perl virtual environment
$virtualenv_path: *new virtual environment path*
$empty: *create empty virtual environment*
return value: *virtual environment path if success, otherwise undef*
find_virtualenv_path($virtualenv_path)
finds Perl virtual environment path by $virtualenv_path argument or
activated virtual environment or running script or PERL5LIB environment
variable
$virtualenv_path: *virtual environment path*
return value: *best matching virtual environment path*
activate2($virtualenv_path, $inform)
activates Perl virtual environment by find_virtualenv_path function
$virtualenv_path: *virtual environment path*
$inform: *informs activated virtual environment path to STDERR if new
activated path differs old one, by default 0*
return value: *activated best matching virtual environment path if
success, otherwise undef*
getinc($virtualenv_path)
gets array ref of include paths given virtual environment path or
sitelib paths
$virtualenv_path: *virtual environment path*
return value: *array ref of paths*
list(%params)
lists packages or modules or files by given %params
%params: *parameters of function*
one: *output is one-column, by default 0*
detail: *prints additional detail by given value('module' or
'file'), by default undef*
return value: *always 1*
main(@argv)
App::Virtualenv main function to run on command-line
See also: virtualenv.pl
<https://metacpan.org/pod/distribution/App-Virtualenv/lib/App/Virtualenv
/virtualenv.pl>
@argv: *command-line arguments*
return value: *exit code of program*
run
runs App::Virtualenv by main function with command-line arguments by
@ARGV
return value: *function doesn't return, exits with main function return
code*
PREVIOUS VERSION
Previous version of App::Virtualenv has include PiV(Perl in Virtual
environment) to list/install/uninstall modules using CPANPLUS API. Aimed
with PiV making a package manager like Python pip. But Perl has various
powerful package tools mainly CPAN and cpanminus, CPANPLUS and etc. And
also building a great package manager requires huge community support.
So, PiV is deprecated in version 2.xx.
You should uninstall previous version before upgrading from v1.xx: cpanm
-U App::Virtualenv; cpanm -i App::Virtualenv;
See also: App::Virtualenv 1.13
<https://metacpan.org/release/ORKUN/App-Virtualenv-1.13>
Deprecated Modules
* App::Virtualenv::Piv
* App::Virtualenv::Module
* App::Virtualenv::Utils
INSTALLATION
To install this module type the following
perl Makefile.PL
make
make test
make install
from CPAN
cpan -i App::Virtualenv
You should uninstall previous version before upgrading from v1.xx: cpanm
-U App::Virtualenv; cpanm -i App::Virtualenv;
DEPENDENCIES
This module requires these other modules and libraries:
* local::lib
* ExtUtils::Installed
* CPAN
* Cwd
* Lazy::Utils
REPOSITORY
GitHub <https://github.com/orkunkaraduman/perl5-virtualenv>
CPAN <https://metacpan.org/release/App-Virtualenv>
SEE ALSO
* App::Virtualenv 1.13
<https://metacpan.org/release/ORKUN/App-Virtualenv-1.13>
* CPAN <https://metacpan.org/pod/CPAN>
* App::cpanminus <https://metacpan.org/pod/App::cpanminus>
* CPANPLUS <https://metacpan.org/pod/CPANPLUS>
AUTHOR
Orkun Karaduman (ORKUN) <orkun@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2017 Orkun Karaduman <orkunkaraduman@gmail.com>
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.