Skip to content

Commit

Permalink
Merge pull request #36 from orkunkaraduman/dev
Browse files Browse the repository at this point in the history
v2.07
  • Loading branch information
orkunkaraduman authored May 20, 2017
2 parents d219c6e + 571e9ad commit c22fad4
Show file tree
Hide file tree
Showing 15 changed files with 192 additions and 205 deletions.
4 changes: 4 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2.07 2017-05-20
- POD changes
- Naming convention changed to snake_case from lowerCamelCase

2.06 2017-03-16
- Accepting more than one packages when listing packages

Expand Down
2 changes: 1 addition & 1 deletion MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ MANIFEST This list of files
MANIFEST.SKIP
README
README.md
t/App-Virtualenv.t
t/00-load.t
2 changes: 1 addition & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WriteMakefile(
'ExtUtils::Installed' => '2.02',
'CPAN' => '2.00',
'Cwd' => '3.47',
'Lazy::Utils' => '1.13',
'Lazy::Utils' => '1.17',
},
EXE_FILES => [qw(
lib/App/Virtualenv/virtualenv.pl
Expand Down
60 changes: 29 additions & 31 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -2,103 +2,101 @@ NAME
App::Virtualenv - Perl virtual environment

VERSION
version 2.06

ABSTRACT
Perl virtual environment
version 2.07

SYNOPSIS
#!/bin/sh
perl -MApp::Virtualenv -erun -- environment_path

See also: virtualenv.pl
<https://metacpan.org/pod/distribution/App-Virtualenv/lib/App/Virtualenv
/virtualenv.pl>

DESCRIPTION
App::Virtualenv is a Perl package to create isolated Perl virtual
environments, like Python virtual environment.

Functions
sh(@args)
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)
perl(@args)
runs Perl interpreter

@args: *arguments of Perl interpreter*

return value: *exit code of Perl interpreter*

activate($virtualenvPath)
activate($virtualenv_path)
activates Perl virtual environment

$virtualenvPath: *virtual environment path*
$virtualenv_path: *virtual environment path*

return value: *virtual environment path if success, otherwise undef*

deactivate($nondestructive)
deactivate($nondestructive)
deactivates Perl virtual environment

$nondestructive: *leaves envionment variables as it is, unless there are
old envionment variables*

return value: *always 1*

create($virtualenvPath, $empty)
create($virtualenv_path, $empty)
creates Perl virtual environment

$virtualenvPath: *new virtual environment path*
$virtualenv_path: *new virtual environment path*

$empty: *create empty virtual environment*

return value: *virtual environment path if success, otherwise undef*

findVirtualenvPath($virtualenvPath)
finds Perl virtual environment path by $virtualenvPath argument or
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

$virtualenvPath: *virtual environment path*
$virtualenv_path: *virtual environment path*

return value: *best matching virtual environment path*

activate2($virtualenvPath, $inform)
activates Perl virtual environment by findVirtualenvPath function
activate2($virtualenv_path, $inform)
activates Perl virtual environment by find_virtualenv_path function

$virtualenvPath: *virtual environment path*
$virtualenv_path: *virtual environment path*

$inform: *informs activated virtual environment path to STDERR if new
activated path differs old one*
activated path differs old one, by default 0*

return value: *activated best matching virtual environment path if
success, otherwise undef*

getInc($virtualenvPath)
getinc($virtualenv_path)
gets array ref of include paths given virtual environment path or
sitelib paths

$virtualenvPath: *virtual environment path*
$virtualenv_path: *virtual environment path*

return value: *array ref of paths*

list(%params)
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*
detail: *prints additional detail by given value('module' or
'file'), by default undef*

return value: *always 1*

main(@argv)
main(@argv)
App::Virtualenv main function to run on command-line

See also: virtualenv.pl
Expand All @@ -109,7 +107,7 @@ DESCRIPTION

return value: *exit code of program*

run
run
runs App::Virtualenv by main function with command-line arguments by
@ARGV

Expand Down Expand Up @@ -181,7 +179,7 @@ SEE ALSO
* CPANPLUS <https://metacpan.org/pod/CPANPLUS>

AUTHOR
Orkun Karaduman <orkunkaraduman@gmail.com>
Orkun Karaduman (ORKUN) <orkun@cpan.org>

COPYRIGHT AND LICENSE
Copyright (C) 2017 Orkun Karaduman <orkunkaraduman@gmail.com>
Expand Down
54 changes: 26 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,104 +4,102 @@ App::Virtualenv - Perl virtual environment

# VERSION

version 2.06
version 2.07

# ABSTRACT

Perl virtual environment
# SYNOPSIS

#!/bin/sh
perl -MApp::Virtualenv -erun -- environment_path

See also: [virtualenv.pl](https://metacpan.org/pod/distribution/App-Virtualenv/lib/App/Virtualenv/virtualenv.pl)

# DESCRIPTION

App::Virtualenv is a Perl package to create isolated Perl virtual environments, like Python virtual environment.

## Functions
See also: [virtualenv.pl](https://metacpan.org/pod/distribution/App-Virtualenv/lib/App/Virtualenv/virtualenv.pl)

# Functions

### sh(@args)
## 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)
## perl(@args)

runs Perl interpreter

@args: _arguments of Perl interpreter_

return value: _exit code of Perl interpreter_

### activate($virtualenvPath)
## activate($virtualenv\_path)

activates Perl virtual environment

$virtualenvPath: _virtual environment path_
$virtualenv\_path: _virtual environment path_

return value: _virtual environment path if success, otherwise undef_

### deactivate($nondestructive)
## deactivate($nondestructive)

deactivates Perl virtual environment

$nondestructive: _leaves envionment variables as it is, unless there are old envionment variables_

return value: _always 1_

### create($virtualenvPath, $empty)
## create($virtualenv\_path, $empty)

creates Perl virtual environment

$virtualenvPath: _new virtual environment path_
$virtualenv\_path: _new virtual environment path_

$empty: _create empty virtual environment_

return value: _virtual environment path if success, otherwise undef_

### findVirtualenvPath($virtualenvPath)
## find\_virtualenv\_path($virtualenv\_path)

finds Perl virtual environment path by $virtualenvPath argument or activated virtual environment or running script or PERL5LIB environment variable
finds Perl virtual environment path by $virtualenv\_path argument or activated virtual environment or running script or PERL5LIB environment variable

$virtualenvPath: _virtual environment path_
$virtualenv\_path: _virtual environment path_

return value: _best matching virtual environment path_

### activate2($virtualenvPath, $inform)
## activate2($virtualenv\_path, $inform)

activates Perl virtual environment by findVirtualenvPath function
activates Perl virtual environment by find\_virtualenv\_path function

$virtualenvPath: _virtual environment path_
$virtualenv\_path: _virtual environment path_

$inform: _informs activated virtual environment path to STDERR if new activated path differs old one_
$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($virtualenvPath)
## getinc($virtualenv\_path)

gets array ref of include paths given virtual environment path or sitelib paths

$virtualenvPath: _virtual environment path_
$virtualenv\_path: _virtual environment path_

return value: _array ref of paths_

### list(%params)
## 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_
> detail: _prints additional detail by given value(&#39;module&#39; or &#39;file&#39;), by default undef_
return value: _always 1_

### main(@argv)
## main(@argv)

App::Virtualenv main function to run on command-line

Expand All @@ -111,7 +109,7 @@ See also: [virtualenv.pl](https://metacpan.org/pod/distribution/App-Virtualenv/l

return value: _exit code of program_

### run
## run

runs App::Virtualenv by main function with command-line arguments by @ARGV

Expand Down Expand Up @@ -174,7 +172,7 @@ This module requires these other modules and libraries:

# AUTHOR

Orkun Karaduman &lt;orkunkaraduman@gmail.com&gt;
Orkun Karaduman (ORKUN) &lt;orkun@cpan.org&gt;

# COPYRIGHT AND LICENSE

Expand Down
16 changes: 8 additions & 8 deletions dev/dist.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ =head1 VERSION
version not defined
=head1 ABSTRACT
=head1 SYNOPSIS
distribution generator
Expand All @@ -22,22 +22,22 @@ =head1 ABSTRACT
use Cwd;


my $podPath = "lib/" . "App::Virtualenv" =~ s/\:\:/\//gr . ".pm";
#my $podPath = "README.pod";
my $base = "${FindBin::Bin}/..";
cwd($base);
my $main_pkg = "App::Virtualenv";
my $pod_path = "lib/" . $main_pkg =~ s/\:\:/\//gr . ".pm";
#my $pod_path = "doc/README.pod";

cwd("${FindBin::Bin}/..");
system("perl Makefile.PL");
system("pod2markdown --html-encode-chars 1 $podPath > README.md");
system("pod2text $podPath > README");
system("pod2markdown --html-encode-chars 1 $pod_path > README.md");
system("pod2text $pod_path > README");
system("rm MANIFEST; make manifest");
system("make dist");

exit 0;
__END__
=head1 AUTHOR
Orkun Karaduman <orkunkaraduman@gmail.com>
Orkun Karaduman (ORKUN) <orkun@cpan.org>
=head1 COPYRIGHT AND LICENSE
Expand Down
4 changes: 2 additions & 2 deletions dev/test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ =head1 VERSION
version not defined
=head1 ABSTRACT
=head1 SYNOPSIS
for internal tests
Expand All @@ -30,7 +30,7 @@ =head1 ABSTRACT
__END__
=head1 AUTHOR
Orkun Karaduman <orkunkaraduman@gmail.com>
Orkun Karaduman (ORKUN) <orkun@cpan.org>
=head1 COPYRIGHT AND LICENSE
Expand Down
Loading

0 comments on commit c22fad4

Please sign in to comment.