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/echo.pl "$filename"}); }