Changeset 11108
- Timestamp:
- 03/13/10 16:23:40 (2 years ago)
- Location:
- trunk/Padre
- Files:
-
- 3 edited
-
Changes (modified) (1 diff)
-
Makefile.PL (modified) (3 diffs)
-
lib/Padre/Action/Tools.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/Changes
r11100 r11108 22 22 - When showing a toolbar panel for the first time, make sure it's lock 23 23 state is consistent with the main_lockinterface config setting (ADAMK) 24 - Local file and remote file installation switched from pip to 25 cpanm (ADAMK) 24 26 25 27 0.58 2010.03.08 **WARNING Still not stable** -
trunk/Padre/Makefile.PL
r11088 r11108 46 46 47 47 my $wxw = eval { use Alien::wxWidgets; 1; }; 48 if ( $@ || !$wxw ) {48 if ( $@ or not $wxw ) { 49 49 print STDERR "Warning: prerequisite Alien::wxWidgets not found.\n"; 50 50 exit 0; … … 71 71 requires 'perl' => '5.008005'; 72 72 requires 'App::Ack' => '1.86'; 73 requires 'App::cpanminus' => '0.9922'; 73 74 requires 'Class::Adapter' => '1.05'; 74 75 requires 'Class::Unload' => '0.03'; … … 124 125 requires 'Parse::ErrorString::Perl' => '0.11'; 125 126 requires 'Parse::ExuberantCTags' => '1.00'; 126 requires 'pip' => '0.13';127 127 requires 'Pod::POM' => '0.17'; 128 128 requires 'Pod::Simple' => '3.07'; -
trunk/Padre/lib/Padre/Action/Tools.pm
r11069 r11108 6 6 use strict; 7 7 use warnings; 8 use File::Spec (); 8 9 use Params::Util (); 9 10 use Padre::Constant (); … … 185 186 } 186 187 188 189 190 191 187 192 ##################################################################### 188 193 # Module Tools … … 212 217 } 213 218 214 $self->install_ pip( $main, $string );219 $self->install_cpanm( $main, $string ); 215 220 return; 216 221 } … … 237 242 } 238 243 239 $self->install_ pip( $main, $string );244 $self->install_cpanm( $main, $string ); 240 245 return; 241 246 } 242 247 243 sub install_ pip{248 sub install_cpanm { 244 249 my $self = shift; 245 250 my $main = shift; 246 251 my $module = shift; 247 252 248 # Find 'pip', used to install modules 249 require File::Which; 250 my $pip = scalar File::Which::which('pip'); 251 unless ( -f $pip ) { 252 $main->error( Wx::gettext("pip is unexpectedly not installed") ); 253 return; 254 } 255 256 $main->setup_bindings; 257 258 # Run with console Perl to prevent unexpected results under wperl 253 # Find 'cpanm', used to install modules 254 require Config; 255 my %seen = (); 256 my @where = grep { 257 defined $_ and length $_ and not $seen{$_}++ 258 } map { 259 $Config::Config{$_} 260 } qw{ 261 sitescriptexp 262 sitebinexp 263 vendorscriptexp 264 vendorbinexp 265 scriptdirexp 266 binexp 267 }; 268 my $cpanm = ''; 269 foreach my $dir ( @where ) { 270 my $path = File::Spec->catfile( $dir, 'cpanm' ); 271 if ( -f $path ) { 272 $cpanm = $path; 273 last; 274 } 275 } 276 unless ( $cpanm ) { 277 $main->error( Wx::gettext("cpanm is unexpectedly not installed") ); 278 return; 279 } 280 281 # Create the command 259 282 my $perl = Padre::Perl::cperl(); 260 my $cmd = qq{"$perl" "$pip" "$module"}; 261 local $ENV{AUTOMATED_TESTING} = 1; 262 Wx::Perl::ProcessStream::Process->new->Run( $cmd, 'CPAN_mod', $main ); 283 my $cmd = qq{"$perl" "$cpanm" "$module"}; 284 $main->run_command($cmd); 263 285 264 286 return;
Note: See TracChangeset
for help on using the changeset viewer.
