Skip to content

Commit

Permalink
Merge pull request #27 from orkunkaraduman/dev
Browse files Browse the repository at this point in the history
v1.13
  • Loading branch information
orkunkaraduman authored Jan 17, 2017
2 parents 3d7fe2c + 6ef9952 commit 28236ca
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 13 deletions.
4 changes: 4 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.13 2017-01-17
- Added AUTOMATED_TESTING in Piv for noninteractive testing
- Used PERL5LIB in Virtualenv::activate

1.12 2017-01-07
- App::Virtualenv::Utils is deprecated
- Noninteractive piv create/install/remove
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ NAME
App::Virtualenv - Perl virtual environment

VERSION
version 1.12
version 1.13

SYNOPSIS
Perl virtual environment
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ App::Virtualenv - Perl virtual environment

# VERSION

version 1.12
version 1.13

# SYNOPSIS

Expand Down
15 changes: 10 additions & 5 deletions lib/App/Virtualenv.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ App::Virtualenv - Perl virtual environment
=head1 VERSION
version 1.12
version 1.13
=head1 SYNOPSIS
Expand Down Expand Up @@ -125,7 +125,7 @@ BEGIN
{
require Exporter;
# set the version for version checking
our $VERSION = '1.12';
our $VERSION = '1.13';
# Inherit from Exporter to export functions and variables
our @ISA = qw(Exporter);
# Functions and variables which are exported by default
Expand All @@ -138,10 +138,15 @@ BEGIN
sub activate
{
my ($virtualenvPath) = @_;
$virtualenvPath = getVirtualenvPath() if not defined $virtualenvPath;
$virtualenvPath = binVirtualenvPath() if not defined $virtualenvPath;
$virtualenvPath = Cwd::realpath($virtualenvPath);
$virtualenvPath = getVirtualenvPath() if not validVirtualenvPath($virtualenvPath);
$virtualenvPath = binVirtualenvPath() if not validVirtualenvPath($virtualenvPath);
for (split(":", defined($ENV{PERL5LIB})? $ENV{PERL5LIB}: ""))
{
last if validVirtualenvPath($virtualenvPath);
$virtualenvPath = "$_/../..";
}
return if not validVirtualenvPath($virtualenvPath);
$virtualenvPath = Cwd::realpath($virtualenvPath);

deactivate(1);

Expand Down
14 changes: 10 additions & 4 deletions lib/App/Virtualenv/Module.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ App::Virtualenv::Module - Module management for Perl virtual environment
=head1 VERSION
version 1.12
version 1.13
=head1 SYNOPSIS
Expand Down Expand Up @@ -34,7 +34,7 @@ BEGIN
{
require Exporter;
# set the version for version checking
our $VERSION = '1.12';
our $VERSION = '1.13';
# Inherit from Exporter to export functions and variables
our @ISA = qw(Exporter);
# Functions and variables which are exported by default
Expand All @@ -50,8 +50,14 @@ my $cb = CPANPLUS::Backend->new();

sub reloadInst
{
my @perl5lib = split(":", defined $ENV{PERL5LIB}? $ENV{PERL5LIB}: "");
$inst = ExtUtils::Installed->new(inc_override => [($perl5lib[0]? ("$perl5lib[0]/$Config{version}/$Config{archname}", "$perl5lib[0]/$Config{version}", "$perl5lib[0]/$Config{archname}", "$perl5lib[0]"): ($Config{sitearch}, $Config{sitelib}))]);
my $perl5lib;
for (split(":", defined($ENV{PERL5LIB})? $ENV{PERL5LIB}: ""))
{
$perl5lib = $_;
last if App::Virtualenv::validVirtualenvPath("$_/../..");
$perl5lib = undef;
}
$inst = ExtUtils::Installed->new(inc_override => [($perl5lib? ("$perl5lib/$Config{version}/$Config{archname}", "$perl5lib/$Config{version}", "$perl5lib/$Config{archname}", "$perl5lib"): ($Config{sitearch}, $Config{sitelib}))]);
return $inst;
}

Expand Down
6 changes: 4 additions & 2 deletions lib/App/Virtualenv/Piv.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ App::Virtualenv::Piv - Perl in Virtual environment
=head1 VERSION
version 1.12
version 1.13
=head1 SYNOPSIS
Expand All @@ -31,7 +31,7 @@ BEGIN
{
require Exporter;
# set the version for version checking
our $VERSION = '1.12';
our $VERSION = '1.13';
# Inherit from Exporter to export functions and variables
our @ISA = qw(Exporter);
# Functions and variables which are exported by default
Expand Down Expand Up @@ -84,6 +84,7 @@ sub main
App::Virtualenv::activate2();
$ENV{PERL_MM_USE_DEFAULT} = 1;
$ENV{NONINTERACTIVE_TESTING} = 1;
$ENV{AUTOMATED_TESTING} = 1;
my $force = defined($args->{'-f'})? 1: 0;
my $test = defined($args->{'-t'})? 1: 0;
my $soft = defined($args->{'-s'})? 1: 0;
Expand All @@ -98,6 +99,7 @@ sub main
App::Virtualenv::activate2();
$ENV{PERL_MM_USE_DEFAULT} = 1;
$ENV{NONINTERACTIVE_TESTING} = 1;
$ENV{AUTOMATED_TESTING} = 1;
my $force = defined($args->{'-f'})? 1: 0;
my $verbose = defined($args->{'-v'})? 1: 0;
my @modules = @{$args->{parameters}};
Expand Down

0 comments on commit 28236ca

Please sign in to comment.