Navigation Menu

Skip to content

Commit

Permalink
add an env document for shell integration.
Browse files Browse the repository at this point in the history
  • Loading branch information
gugod committed Oct 16, 2010
1 parent cb0da72 commit 044d9d1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lib/App/perlbrew.pm
Expand Up @@ -453,6 +453,26 @@ sub run_command_mirror {
return;
}

sub run_command_env {
my($self) = @_;
my %env = (
VERSION => $VERSION,
ROOT => $ROOT,
PATH => "$ROOT/perls/current/bin"
);

if ($ENV{SHELL} =~ /(ba|z)sh$/) {
while (my ($k, $v) = each(%env)) {
print "export PERLBREW_$k=$v\n";
}
}
else {
while (my ($k, $v) = each(%env)) {
print "setenv PERLBREW_$k $v\n";
}
}
}

sub _http_get {
my ($self, $url, $cb, $header) = @_;
require HTTP::Lite;
Expand Down

0 comments on commit 044d9d1

Please sign in to comment.