Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

revert the 'perlbrew' executable to version 0.14 so it's more stable.

We probably should not re-generate frequently. It seems good enough to re-generate
the standalone executable when tagging a release.
  • Loading branch information...
commit 3c5a5641eb1128bcb5fb0178ee427f60f24dccf1 1 parent 6aa1346
Kang-min Liu authored November 30, 2010

Showing 1 changed file with 14 additions and 19 deletions. Show diff stats Hide diff stats

  1. 33  perlbrew
33  perlbrew
@@ -59,7 +59,7 @@ use 5.008;
59 59
 use Getopt::Long ();
60 60
 use File::Spec::Functions qw( catfile );
61 61
 
62  
-our $VERSION = "0.14_99";
  62
+our $VERSION = "0.14";
63 63
 our $CONF;
64 64
 
65 65
 my $ROOT         = $ENV{PERLBREW_ROOT} || "$ENV{HOME}/perl5/perlbrew";
@@ -189,26 +189,19 @@ if [[ -f $HOME/.perlbrew/init ]]; then
189 189
 fi
190 190
 
191 191
 __perlbrew_set_path () {
192  
-    [[ -z "$PERLBREW_ROOT" ]] && return 1
193 192
     export PATH_WITHOUT_PERLBREW=$(perl -e 'print join ":", grep { index($_, $ENV{PERLBREW_ROOT}) } split/:/,$ENV{PATH};')
194 193
     export PATH=$PERLBREW_PATH:$PATH_WITHOUT_PERLBREW
195 194
 }
196 195
 __perlbrew_set_path
197 196
 
198 197
 perlbrew () {
199  
-    local exit_status
200 198
     case $1 in
201 199
         (use)
202 200
             if [[ -x "$PERLBREW_ROOT/perls/$2/bin/perl" ]]; then
203 201
                 eval $(command perlbrew env $2)
204 202
                 __perlbrew_set_path
205  
-            elif [[ "$2" = "system" ]]; then
206  
-                unset PERLBREW_PERL
207  
-                eval $(command perlbrew env)
208  
-                __perlbrew_set_path
209 203
             else
210  
-                echo "$2 is not installed" >&2
211  
-                exit_status=1
  204
+                echo "$2 is not installed";
212 205
             fi
213 206
             ;;
214 207
 
@@ -222,12 +215,8 @@ perlbrew () {
222 215
                 command perlbrew env $2 >> $HOME/.perlbrew/init
223 216
                 source $HOME/.perlbrew/init
224 217
                 __perlbrew_set_path
225  
-            elif [[ "$2" = "system" ]]; then
226  
-                perlbrew off
227  
-                return $?
228 218
             else
229  
-                echo "$2 is not installed" >&2
230  
-                exit_status=1
  219
+                echo "$2 is not installed";
231 220
             fi
232 221
             ;;
233 222
 
@@ -247,11 +236,9 @@ perlbrew () {
247 236
 
248 237
         (*)
249 238
             command perlbrew $*
250  
-            exit_status=$?
251 239
             ;;
252 240
     esac
253 241
     hash -r
254  
-    return ${exit_status:-0}
255 242
 }
256 243
 
257 244
 
@@ -528,6 +515,12 @@ sub run_command_list {
528 515
     }
529 516
 }
530 517
 
  518
+sub run_command_installed {
  519
+    print STDERR "\nDEPRECATION WARNING: `perlbrew installed` will be deprecated soon. Please run `perlbrew list` instead.\n\n";
  520
+    sleep 1;
  521
+    &run_command_list;
  522
+}
  523
+
531 524
 sub run_command_switch {
532 525
     my ( $self, $dist ) = @_;
533 526
 
@@ -763,7 +756,7 @@ perlbrew - Perl Environment manager.
763 756
     Commonly used commands:
764 757
         init           Initialize perlbrew environment.
765 758
         install        Install perl
766  
-        list           List installed perls
  759
+        switch         List installed perls
767 760
         use            Use the specified perl in current shell
768 761
         switch         Permanently use the specified perl as default
769 762
         mirror         Pick a preffered mirror site
@@ -847,14 +840,16 @@ You don't need to do this unless you were using old perlbrew to
847 840
 install perls. The installation layout is changed since version 0.11.
848 841
 
849 842
 If you just upgraded perlbrew and found C<perlbrew switch> failed to work
850  
-after you switch to a development release of perl, say, perl-5.13.6, run this command:
  843
+after you switch to a development release of perl, say, perl-5.13.5, run this command:
851 844
 
852 845
     perlbrew symlink_executables perl-5.13.6
853 846
 
854 847
 This essentially creates this symlink:
855 848
 
856 849
    ${PERLBREW_ROOT}/perls/perl-5.13.6/bin/perl
857  
-   -> ${PERLBREW_ROOT}/perls/perl-5.13.6/bin/perl5.13.6
  850
+   -> ${PERLBREW_ROOT}/perls/perl-5.13.5/bin/perl5.13.6
  851
+
  852
+You should not need to do this if you are using perlbrew 0.11 or newer, to intsall
858 853
 
859 854
 =item B<install-cpanm>
860 855
 

0 notes on commit 3c5a564

Please sign in to comment.
Something went wrong with that request. Please try again.