in reply to Re^2: How do I run a perl script with an alternate perl.exe from Padre?
in thread How do I run a perl script with an alternate perl.exe from Padre?

From padre type Alt + Tools + Plug-in Tools + Edit My Plug-in

Then edit My.pm to add

sub menu_plugins_simple { my $self = shift; return $self->plugin_name => [ 'About' => sub { $self->show_about }, # Padre::Wx::Main=HASH(0x2e189cc) Wx::CommandEvent=SCALAR(0x3d3ed2c) 'Run echo.bat $filename'."\tCtrl-Alt-F5" => \&run_echo, ]; } sub run_echo { my $self = shift; my $main = eval { $self->main } || $self; my $document = $self->current->document; warn "document : $document\n"; my $filename = $document->filename || $document->tempfile; warn "filename : $filename\n"; local $ENV{PADRE_FILENAME} = $filename if defined $filename; $main->run_command(qq{C:/full/path/to/perl.EXE C:/full/path/to/e +cho.pl "$filename"}); }

After you enable this plugin ( Tools + Plug-in Manager ) type Ctrl-Alt-F5 and watch the Output pane with amazement.

  • Comment on Re^3: How do I run a perl script with an alternate perl.exe from Padre?
  • Download Code

Replies are listed 'Best First'.
Re^4: How do I run a perl script with an alternate perl.exe from Padre?
by Je55eah (Novice) on Jun 18, 2012 at 00:33 UTC
    Thank you. Although I havn't made time to test this properly, I appreciate the work that you have done here.