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

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

@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

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

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/>.